adding docstrings to some functions and classes