added new fields to aggregation formula