update sample_rand