move aggregations to own file