Added anagram checking functionality