Creating your own event emitter object