better seeding, cleaner code