Update DataGenerator

revised generateData() function