make compatible with python2.6