moved emitter into module scope