make it compatible with python2.5