Added method to check if it is palindrome