Added docstrings to db_function file