cosmetic refactoring of p32.py