simplify some comparisons