refactor of the doc interface