add palindrome check function mathAPI