Modify thresholdFilter (rebase error + double parameters)