simplify conditions