changed module EventEmitter to class EmitterAgent