generalized data aggregation