rewrite headers