add test for throshold
Fix bug in threshold
add test for threshold without arguments