compatibility with python2.5