format rewrite