thresholding for green ball working