refactoring + doc