How to create an aggregator