public int GetPop(String location){
	int population = 0;
	WAQuery query = engine.createQuery();
	query.setInput(location);
	try {
            WAQueryResult queryResult = engine.performQuery(query);
            if (queryResult.isError()) {
            } else if (!queryResult.isSuccess()) {
            } else {
                for (WAPod pod : queryResult.getPods()) {
                    if (!pod.isError()) {
                        if(pod.getTitle().equals("Populations")){
			    for (WASubpod subpod : pod.getSubpods()) {
				for (Object element : subpod.getContents()) {
				    if (element instanceof WAPlainText) {
					String s = ((WAPlainText) element).getText().substring(18);
					s = s.substring(0, s.indexOf(" "));
					population = Integer.parseInt(s);
				    }
				}
			    }
                        }
                    }
                }
            }
        } catch (WAException e) {
            e.printStackTrace();
        }
	return population;
    }