grouping of relations