Merge pull request #25 from rkawauchi/master

add threshold
Fix dumb typo
Merge remote-tracking branch 'upstream/master'
working shreshold function"