making the delete and edit function