analysis rewrite