modified rewrite-pseudo-code.py