add doc thresholding

Few docstrings... :)