added palindrome class
working implementation