implemented wordAnagrams