Added set_rand_all method