added wavelet code