EventDispatcher class is responsible for dispatching events