What was the purpose of the Constitutional Convention of 1787?

to write a new Constitution
to put down Shays’ Rebellion
to revise the Articles of Confederation
to dismantle the national government