refactoring + docs