Use get_events in event handler