now some funcitons are private, added go createNewEventHandler that
encapsulate the creation and initialization of an event_handler