turn controller into an event emitter