fixing noise waveform generation