added kb thresholding