added palindrome implementation