added event emitter code