solution to ThePalindrome