developing the aggregation step