added edit and delete functions to edit.js