removed tree-reduce and added randomized reduce