compatible with python2.5