added redraw to DrawWaveform. Methods are slightly modified.