threshold with min value