public String perform(HttpServletRequest request) {
		String addr = request.getParameter("address");
		logger.info("getting data for address " + addr);
		//TODO test data, tobe removed
		//addr = "Allegheny";
		String placeAdd;
		String placeFP = null;
		String stateFP = null;
		String countyCode = null;
		String queryPlace = null;
		Map<String, String> detailedAdd = null;
		Map<String, Map<String, String>> result = new HashMap<String, Map<String, String>>();
		Map<String, String> mapPopSex = new HashMap<String, String>();
		Map<String, String> mapPopAge = new HashMap<String, String>();
		Map<String, String> mapIncome = new HashMap<String, String>();
		result.put("gender", mapPopSex);
		result.put("age", mapPopAge);
		result.put("income", mapIncome);
		request.setAttribute("geoRange", "");
		StringBuilder sb = new StringBuilder("Data : ");
		request.setAttribute("uscbResult", result);
		try {
			detailedAdd = GMap.getAddress(addr);
		} catch (InsightException e) {
			logger.warning(e.getMessage());
			request.setAttribute("errorUscb", e.getMessage());
			return "uscb.jsp";
		}
		logger.info("Getting data for detailed address: " + detailedAdd.get("formattedAddress"));
		placeAdd = detailedAdd.get("locality").toLowerCase() + "_"
				+ detailedAdd.get("county").toLowerCase() + " county";
		String state = detailedAdd.get("state");
		String county = detailedAdd.get("county");
		String countyKey = county+"_"+state;
		//if locality is not specified or if it's specified but not in the map
		if(detailedAdd.get("locality").equals("") || !PlaceMap.getPlaceMap().containsKey(placeAdd)){
			//if county is specified and in the Map
			if(!detailedAdd.get("county").equals("") && PlaceMap.getCountyMap().containsKey(countyKey)){
				stateFP = PlaceMap.getStateMap().get(state);
				countyCode = PlaceMap.getCountyMap().get(countyKey);
				queryPlace = "&for=county:" + countyCode + "&in=state:"
						+ stateFP;
				sb.append(detailedAdd.get("county") + " ");
				sb.append(detailedAdd.get("state"));
			}
			else{//only use the state data
				stateFP = PlaceMap.getStateMap().get(state);
				queryPlace = "&for=state:" + stateFP;
				sb.append(detailedAdd.get("state"));
			}
		}
		else{//if locality is specified
			placeFP = PlaceMap.getPlaceMap().get(placeAdd).get(0).getPlaceFP();
			stateFP = PlaceMap.getPlaceMap().get(placeAdd).get(0).getStateFP();
			queryPlace = "&for=place:" + placeFP + "&in=state:" + stateFP;
			sb.append(detailedAdd.get("locality") + " ");
			sb.append(detailedAdd.get("county") + " ");
			sb.append(detailedAdd.get("state"));
		}
		request.setAttribute("geoRange", sb.toString());
		try {
			String female = USCB.getSFData(BASEURL.USCB_FEMALEPP, queryPlace);
			String male = USCB.getSFData(BASEURL.USCB_MALEPP, queryPlace);
			mapPopSex.put("female", female);
			mapPopSex.put("male", male);
			
		} catch (InsightException e) {
			logger.warning(e.getMessage());
			//request.setAttribute("errorUscb", e.getMessage());
			//fake gov data
			mapPopSex.put("female", "158922");
			mapPopSex.put("male", "158202");
		}
		try {
			String ageUnder18 = USCB.getACSData(BASEURL.USCB_UNDER18,
					queryPlace);
			String ageAbove18 = USCB.getACSData(BASEURL.USCB_ABOVE18,
					queryPlace);
			String ageAbove64 = USCB.getACSData(BASEURL.USCB_ABOVE64,
					queryPlace);
			mapPopAge.put("under18", ageUnder18);
			mapPopAge.put("between18to64", Integer.toString((Integer
					.parseInt(ageAbove18) - Integer.parseInt(ageAbove64))));
			mapPopAge.put("above64", ageAbove64);
		} catch (InsightException e) {
			logger.warning(e.getMessage());
			//request.setAttribute("errorUscb", e.getMessage());
			//fake gov data
			mapPopAge.put("under18", "45542");
			mapPopAge.put("between18to64", "184720");
			mapPopAge.put("above64", "54321");
		}
		try {
			String medianHouseholdIncome = USCB.getACSData(
					BASEURL.USCB_MEDINCOME, queryPlace);
			mapIncome.put("incomeMid", medianHouseholdIncome);
		} catch (InsightException e) {
			logger.warning(e.getMessage());
			//request.setAttribute("errorUscb", e.getMessage());
			mapIncome.put("incomeMid", "46392");
		}
		return "uscb.jsp";
	}