check anagram first