adding event emitter