changes to run under python2.