rigid envelopes and boxes in a single flow