modify to python2.7