handle multiple anagrams