Added check if string is a palindrome