more updates to random generation