working on waveform