docs and refactoring
docs