Use sets to avoid groups with duplicate names