Added support for aggregating data