moved aggregation from data_aggregation branch