added thresh input to example