added docstring to output()