working on the data files in the directories