data is now saved in a txt file