make one compatible with python2.x and python3.x