improve generator by using emitter types