update second trial of valid-palindrome