changes to run on python 3