added docstrings to all not private functions