documentation and refactoring
indentation