added first working commit of event dispatcher