Semi rewrite