Added the palindrome option.