implement edit and delete events