compatible to Python2.6