Added random seeding