Added random numbers and seeding