Adding aggregation function to this repo