public float GetDensity(String location){
	float density = 0f;
	WAQuery query = engine.createQuery();
	query.setInput(location+" population density");
	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("Result")){
			    for (WASubpod subpod : pod.getSubpods()) {
				for (Object element : subpod.getContents()) {
				    if (element instanceof WAPlainText) {
					String s = (((WAPlainText) element).getText().substring(0,((WAPlainText) element).getText().indexOf(" ")));
					density = Float.parseFloat(s);
				    }
				}
			    }
                        }
                    }
                }
            }
        } catch (WAException e) {
            e.printStackTrace();
        }
	return density;
    }