change on_after_entering_on_event to on_event