update docstring, simplified function interface