changed aggregation api and added provider tests