utility tools for writing mapreduce algorithms