added palindrome function