fixed reduce example