added code for haar transform. Needs to be tested