Doc rewrite