added docstring to new code