rewrite doc