turned Sean's function comments into docstrings