handle delete event