adding back copy to preserve thresh_img