use function instead of lambda
use correct namespace
more gamma in example
doc thresholding