more work on reverse transform
added levels to forward transform