check palindrome; creates instance of Eq class