move aggregation logic into own class
revert comments