worked on anagram_groups method