add palindrome method in the common class