add docstrings for functions