original ganked code
added some palindromes. validation seems to work.