hw2: add method to create data file