added thresholding function
Merge pull request #2 from cboss24/thresholding

added thresholding function