add logic to control iterating through multiple passes of MapReduce