refator aggregation rule