some changes to the code that generates arbitrary waveforms.