add resample_threshold_never/always