adjusting threshold