refactored entity emitter