edit and rewrite