changes to python3 also