added reduce output