threshold only to be changed when have enough sample points