reworking grouped boolean operations