fix the waveform according to code review
code style fixes