recursive palindrome checker