refactor random_seed program