Initial implementation of DWT