waveform rewrite to avoid extractplanes