rewrite 50%
cleanup
rewrite 90%
rewrite complete!