public void categoryDist() {
		int totalCategoryCnt = 0;
		int totalBusinessCnt = 0;
		Map<String, Integer> categoryCntMap = new HashMap<String,Integer>();
		for (Business business:businessMap.values()) {
			//System.out.println("hello");
			for (String category:business.categories) {
				totalBusinessCnt += 1;
				if (!categoryCntMap.containsKey(category)) {
					categoryCntMap.put(category,0);
					totalCategoryCnt += 1;
				}
				categoryCntMap.put(category,categoryCntMap.get(category)+1);
			}
		}
		ValueComparator bvc =  new ValueComparator(categoryCntMap);
		//		TreeMap<String, Integer> sorted_map_1 = new TreeMap<String, Integer> ();
		//		sorted_map_1.put("a",1);
		//		for (String a: sorted_map_1.keySet()) {
		//			System.out.println(a);
		//			System.out.println(sorted_map_1.get(a));
		//		}
		TreeMap<String,Integer> sorted_map = new TreeMap<String,Integer>(bvc);
		for (String key:categoryCntMap.keySet()) {
			sorted_map.put(key,categoryCntMap.get(key));
		}
		//sorted_map.putAll(categoryCntMap);
		int count = 0;
		DefaultPieDataset pieDataset = new DefaultPieDataset();
		double percentTot = 0.0;
		System.out.println("begin plotting");
		System.out.println(sorted_map.keySet());
		System.out.println(sorted_map.values());
		List<String> keys = new ArrayList<String> (sorted_map.keySet());
		List<Integer> values = new ArrayList<Integer>(sorted_map.values());
		//		for (String key:sorted_map.keySet()) {
		//			//System.out.println("hello");
		//			System.out.println(key);
		//			System.out.println(categoryCntMap.get(key));
		//			System.out.println(sorted_map.get(key));
		//			double percent = (double)sorted_map.get(key)/totalBusinessCnt;
		//			percentTot += percent;
		//			pieDataset.setValue(key, percent);
		//			count ++;
		//			if (count == 10) break;
		//		}

		for (int i = 0; i < keys.size(); i++) {
			double percent = (double)values.get(i)/totalBusinessCnt;
			percentTot += percent;
			pieDataset.setValue(keys.get(i), percent);
			count ++;
			if (count == 10) break;
		}
		System.out.println(percentTot);
		if (percentTot != 1) {
			pieDataset.setValue("other",1-percentTot);
		}

		JFreeChart chart = ChartFactory.createPieChart ("Category Distribution", pieDataset, true, true, false);
		try {
			ChartUtilities.saveChartAsJPEG(new File("piechart.jpg"), chart, 500, 300);
		} catch (Exception e) {
			System.out.println("Problem occurred creating chart.");
		}
	}