create event delete function