add threshold option