changed to user input for threshold parameters