added anagram function