added some controls for the threshold parameters