reduce protocol and examples