more readability on palindrome function