finished preprocess, started on thresholding