fit to python2.6