improved simplify test