changed files to port to Python3