implementing wave_db to store waveforms