correction of gen_rand_conf and preminim