add reduce (includes examples and tests)