trade rewrite