Added a new haar wavelet transform method, seems to work better