private static void addEntries(HashMap<String, HashMap<String, Double>> unaries, C to_add, HashMap parseChart) {

		if (parseChart.values().contains(to_add) == false) {
			// add in thread
			if (parseChart.keySet().contains(to_add.getLabel()) == false) {
				parseChart.put(to_add.getLabel(), to_add);
				if (unaries.containsKey(to_add.getLabel())) {
					HashMap<String, Double> poss_left_p = unaries.get(to_add.getLabel());
					for (Map.Entry<String, Double> entry : poss_left_p.entrySet()) {
						String left = entry.getKey();
						double p = entry.getValue();
						C uni_c = new C(left, to_add, null, p * to_add.getP(), 1);
						addEntries(unaries, uni_c, parseChart);
					}
				}
			} else {
				C cur_c = (C) parseChart.get(to_add.getLabel());
				if (cur_c.getP() <= to_add.getP()) {
					parseChart.put(to_add.getLabel(), to_add);
					if (unaries.containsKey(to_add.getLabel())) {
						HashMap<String, Double> poss_left_p = unaries.get(to_add.getLabel());
						for (Map.Entry<String, Double> entry : poss_left_p.entrySet()) {
							String left = entry.getKey();
							double p = entry.getValue();
							C uni_c = new C(left, to_add, null, p * to_add.getP(), 1);
							addEntries(unaries, uni_c, parseChart);
						}
					}
				}
			}
		} 
	}