public void setPhaseResult(Main main) {
	  	//If nothing has been parsed, handle Error
	  	
	  	main.setDmResult(null);
	  	int i =0;
//	  	for (String s : Main.giveMain().getNluResult().get(0)) {
//	  		System.out.println("Keyword" + " " + i + ": " + s);
//	  		i++;
//	  	}
	  	if (dialogManager.getErrorState() != ErrorState.ZERO 
	  			&& (main.getNluResult().get(0).isEmpty() || main.getNluResult().get(0).contains("first"))
	  			&& !main.getNluResult().get(3).isEmpty()) {
	  		/* in this case the system gave the user a choice or used a method of verification
	  		 * and expects an answer. Though, if the user answers with a sentence which contains
	  		 * a keyword, this case can be ignored and the system can continue with its
	  		 * previous task.
	  		 */
	  		dialogManager.handleError(main.getNluResult().get(3));
	  	} else {
		  	dialogManager.updateDialog(main.getNluResult().get(0), main.getNluResult().get(1),
				main.getNluResult().get(3));
	  	}
		
		//this is needed because ErrorHandlingState will not be saved in the dialog history
		//thus it will not be saved as current dialogstate
		if(main.getDmResult() == null) {
	  		main.setDmResult(dialogManager.getCurrentDialog().getCurrentDialogState());
	  	}
  }