Added docstrings for all the functions