minimized unsafe region in get_event()