Added routine to aggregate data from several docs