added emitReduce helper