aggregation-services code