docstring changes + refactoring