debugged aggregation