last edit to make the delete button on the edit page  work