add a code to construct DWT