having issues with gen_rand_solution