Fix minor error with threshold, update documentation