add python2 support