compatible with Python2.4