update random_sample