added docstrings to all of the functions