add anagrams implementation