Added rnd_number to sample selection