change in reduce functionality