add threshold
Merge pull request #2 from PeerJ/AddThreshold

Add threshold - thanks a lot for the pull request!