refactoring, updating documentation