Returned to a working version before testing the maximum aggregation