change internal event handler for testing