add is_palindrome function to prob4