Thresholdcontrol

fix #140