added on_event_loop