change the event handler