docstrings and logging