max reduce example