cleanup, docstring
refactoring