added aggregations support