waveHandler implemented