simplify equals() method