implemented 1d haar wavelet transform