Added more events, added helper function