documentation
documentation and refactoring