close to finishing isPalindrome