apply to python2