Rewrite where needed