clean up getEvent fn