refactor missed the delete button event listener