update some py code