Mods for python 3