add threshold
Merge pull request #2 from PeerJ/AddThreshold

add threshold