added threshold_value param