final version with seeds