change structure of the code