docstrings added, logging working