update entity_aggregation logic