added delete event function