implement Anagrams homework