refactor the data generation code