add max aggregation