added threshold docstring