my implementation of EventEmitter