clean up boolean operators for piecewise