attempt to support keep_sample_mean