convert to python2.7