local threshold is only based within the bundary
Merge pull request #3 from cboss24/threshold

local threshold is only based within the bundary