updated anagram

removed redundant transforms, clarified variable names