This is still weird, specifying a threshold in the constructor should automatically set the mode to THRESHOLD, no need for the mode paramter