doc rewrite