move event handler up to caller

Not event driven still.
The concern here is would it be too complicated to abstract event-related code from caller function