Changed groups from groupOfNames to groupOfUniqueNames