public String diff() throws IOException {
		String answer = "";

		answer += "    Difference between the current Project-Directory and the latest version (ID: " + HEAD.ID +") \n \n";

		File directory = new File(ProjectDirectory);
		File[] fileList = directory.listFiles();
		if (fileList.length-index.size() != 2) {
			for (File projectfile : fileList) {
				String projectfileName = projectfile.getName();
				String extension = projectfileName.substring(projectfileName.lastIndexOf(".") + 1, projectfileName.length());
				if (projectfile.isFile() && (!projectfileName.equals(".DS_Store")) && (!extension.equals("key"))) {
					answer += "\t" + projectfile.getName() + ": \n";
					File versionfile = new File(HeadFilesDirectory + File.separator + projectfile.getName());

					if (versionfile.isFile()) {

						SHA1 projectfileHash = new SHA1(Utilities.FileToByteArray(projectfile));
						SHA1 versionfileHash = new SHA1(Utilities.FileToByteArray(versionfile));

						if (!versionfileHash.getSHA1().equals(projectfileHash.getSHA1())) {

							//if a file in the project directory was already in the latest version: show the difference
							List<String> original = Utilities.fileToLines(versionfile.getAbsolutePath());
							List<String> revised  = Utilities.fileToLines(projectfile.getAbsolutePath());

							DiffRowGenerator.Builder builder = new DiffRowGenerator.Builder();             
							boolean sideBySide = true;  //default -> inline
							builder.showInlineDiffs(!sideBySide); 
							builder.columnWidth(120);
							DiffRowGenerator dfg = builder.build();                
							List<DiffRow> rows = dfg.generateDiffRows(original, revised);    

							int rowNumber = 0;
							for (DiffRow row: rows) {
								rowNumber++;
								if (!row.toString().equals("")) {
									answer += "\t   Line " + rowNumber +": " + row + "\n";
								}
							}
							answer += "\n";
						} else {
							answer += "\t   #There are no changes in this file \n \n";
						}
					} else {
						//if a file in the project directory was not in the latest version: file is recently added
						answer += "\t   #This file is recently added to the project \n \n";
					}
				}
			}
		} else {
			answer += "\t there are no files in the repository to diff with the latest version \n";
		}
		return answer;
	}