added many docstrings