implemented a small palindrome example