refact to use morearty instead of EventEmitter