Added palindrome check