Added grouping terms by contribution