docstrings, remove statfn