refactor to take out fileNames