renamed *redue functions to *reduce