added terms aggregation