pattern aggregation