simplify the code transform code some more