latest refactorings in the python3 style