preprocess keep and changes to waveform