Adding code for event deletion