random generation working again