changed the way the event is raised