more tuning to python2