working on IndexReduce