update rewrite js