fixed recursivePalindrome