change structure of python