delete event  function added

delete and create event function properly