improved random seeding