simplify equality comparison