added support for aggregation framework