https://demo.thi.ng/umbrella/adaptive-threshold/