Adjusting threshold