Added min and max aggregation