setting the threshold