basic query one and two done with map reduce