added simple waveform generation