commented on all functions, and started a storeData() function to write data to file