made module an event emitter