change to proper handler for event_register