add aggregation and reshape