private void updateStateAskOrigin(List<Keyword> keywords, List<String> terms) {
	RecipeLearningState nextState;
	List<Keyword> countries = keywordsFromType(KeywordType.COUNTRY, keywords);
	if (countries.size() == 0) {
		if (terms.size() >  0) {
			ArrayList<DialogState> states = new ArrayList<DialogState>();
			states.add(new RecipeAssistanceState(RecipeAssistance.RA_TELL_COUNTRY_FOUND));
			states.add(new RecipeLearningState(RecipeLearning.RL_ASK_FIRST_INGREDIENT));
			ArrayList<Data> refs = new ArrayList<Data>();
			refs.add(recipe.getRecipeData());
			KeywordData newCountry = new KeywordData(terms.get(terms.size() - 1), states, 5, refs, KeywordType.COUNTRY);
			newCountry.writeFile();
			DialogManager.giveDialogManager().getDictionary().addKeyword(terms.get(terms.size() - 1), 5, states, refs, KeywordType.COUNTRY);
			countryOfOrigin = terms.get(terms.size() - 1);
			keywords.add(new Keyword(newCountry));
		}
		//theoretically never happens
		else {
			DialogManager.giveDialogManager().setInErrorState(true);
		}
	}
	else if(countries.size() == 1) {
		countryOfOrigin = countries.get(0).getWord();
		countries.get(0).getKeywordData().getDataReference().add(recipe.getRecipeData());
		countries.get(0).getKeywordData().getDialogState().add(new RecipeAssistanceState(RecipeAssistance.RA_TELL_COUNTRY_FOUND));
		countries.get(0).getKeywordData().writeFile();
	}
	else {
		countryOfOrigin = countries.get(0).getWord();
		countries.get(0).getKeywordData().getDataReference().add(recipe.getRecipeData());
		countries.get(0).getKeywordData().writeFile();
		
	}
	nextState = new RecipeLearningState(RecipeLearning.RL_ASK_FIRST_INGREDIENT);
	setCurrentDialogState(nextState);
}