made event dispacher a module instead of it being global