add support for sub aggregations