fix python3 code structure

EVERYTHING EVER