fix with instance thresholding