added seeded random gen.