rewrite security