implemented saving and loading map reduce documents.