#233: Add threshold option