adding treshold