changes to event handling