adding threshold