reduction now supports non-binary operands