Update rewrite.py