add palindrome number algorithm