support Python 2.x