implement standalone version with seeded rng capability