adds "delete" button event handling