Added an event dispatcher