added processFilesInDirectory