add function isPalindsome