rewrite preamble