- added threshold option