added waveform display module
some code shifting