added isPalindrome