make some Python 3 changes, still not working though