rewrite and edits