thresholding on wire works