rewrite doc for init, api