adaptive threshold and benchmarks