defining palindrome function
adding IO for palindrome definition