update rewrite