added distributed reduce