make aggregation grappa code match implementations