to check for anagram
to check for anagram