added the threshold parameters