public BAISReturn processFile(List<FormDataBodyPart> fields, String combineFiles, String noDuplicates, String sorting, WordDAO wordDao) throws IOException {
		
		this.wordDao = wordDao;
		
		totalFiles = fields.size();
		
		if (totalFiles < 1) {
			br.setErrorMessage("You must submit at least one file!");
			return br;
		}
		
		for (FormDataBodyPart field : fields) {
			// Pull in data 
			WFPContents fileContents = dataIn(field);
			
			if (!fileContents.isTxtFile()) {
				br.setErrorMessage("Please submit files in .txt format only.");
				return br;
			} else {
				// put into lists
				listCreate(fileContents);
			}			
		}		

		// combine files if needed
		if (combineFiles != null && !combineFiles.isEmpty()) {
			combineFiles(finalFiles.entrySet());
		}
		
		// deduplicate		
		if (noDuplicates != null && !noDuplicates.isEmpty()) { 
			removeDuplicates(finalFiles.entrySet());
		}
		
		// clear any empty lines
		clearEmptyLines(finalFiles.entrySet());
		
		// sort
		if (sorting != null && !sorting.isEmpty()) {
			sortFiles(finalFiles.entrySet(), sorting);
		}
		
		// update db
		processTracking();
		
		// make the file to return it		
		ByteArrayOutputStream baos = this.finalFile();
		
		br.setBais(new ByteArrayInputStream(baos.toByteArray()));
		
		return br;
	}