adjust threshold value