public static Tree decisionTreeLearning(
			ArrayList<HashMap<String, String>> examples,
			ArrayList<String> attributes, String goalAttribute,
			HashMap<String, String[]> attributeValues,
			ArrayList<HashMap<String, String>> parentExamples) {
		print("Attributes: " + attributes);
		print("Examples: " + examples);
		if (examples.isEmpty()) {
			print("examples.isEmpty()\n");
			return new Tree(new GoalNode(pluralityValue(parentExamples,
					goalAttribute)));
		} else if (hasSameClassifications(examples, goalAttribute)) {
			print("hasSameClassifications(examples)\n");
			return new Tree(new GoalNode(examples.get(0).get(goalAttribute)));
		} else if (attributes.size() == 1) {
			print("attributes.isEmpty()\n");
			return new Tree(new GoalNode(
					pluralityValue(examples, goalAttribute)));
		}
		String A = "";
		double largestImportance = -1;
		for (int i = 0; i < attributes.size() - 1; i++) {
			String attr = attributes.get(i);
			double importance = Importance2.informationGain(attr, examples,
					attributeValues, goalAttribute);
			print("A: " + attr + "\timportance: " + importance);
			if (importance > largestImportance) {
				largestImportance = importance;
				A = attr;
			}
		}
		print(A);

		Tree tree = new Tree(new AttributeNode(A));

		for (String vk : attributeValues.get(A)) {
			ArrayList<HashMap<String, String>> exs = getExs(A, vk, examples);
			ArrayList<String> attributesMinusA = cloneArrayList(attributes);
			attributesMinusA.remove(A);
			print("A: " + A);
			print("vk: " + vk);
			print("exs:" + exs);
			print("attributesMinusA: " + attributesMinusA);
			print("");
			Tree subtree = decisionTreeLearning(exs, attributesMinusA,
					goalAttribute, attributeValues, examples);
			tree.appendSubtree(vk, subtree);
		}

		return tree;
	}