docstrings added (not finished)