made data generation more efficient