public static void printAllPercentileLocationHomeDistanceRestByDuration(int percentile, int duration){
		try {
			Connection con = dbConnect();
			PreparedStatement getXY = con.prepareStatement(
					"SELECT x,y FROM "+locTbl+" WHERE locationID = ?");
			PreparedStatement getDistance = con.prepareStatement(
					"SELECT personID,distance FROM "+locHomeDistTbl+" WHERE locationID = ? ORDER BY distance ASC");
			for (int location = 1; location <= numLocations; location++){
				HashSet<Integer> peopleAtLocLongEnough = getPeopleAtLocationForAtLeastSpecDur(location, duration);
				getXY.setInt(1, location);
				getDistance.setInt(1, location);
				ResultSet getXYQ = getXY.executeQuery();
				ResultSet getDistanceQ = getDistance.executeQuery();
				getDistanceQ.last();
				int numPeople = getDistanceQ.getRow();
				if (numPeople > 0) {
					getDistanceQ.beforeFirst();
					ArrayList<Double> distances = new ArrayList<Double>(numPeople);
					while (getDistanceQ.next()) {
						double distance = getDistanceQ.getDouble("distance");
						Integer personID = new Integer(getDistanceQ.getInt("personID"));
						if (peopleAtLocLongEnough.contains(personID))
							distances.add(distance);
					}
	//				System.out.println("number of people: "+numPeople);
					numPeople = distances.size();
					int index = (percentile*numPeople)/100;
	//				System.out.println("row number: "+person);
					if (index > 0 && getXYQ.first()){
						System.out.println(getXYQ.getDouble("x")+"\t"+getXYQ.getDouble("y")+
								"\t"+distances.get(index));
					}
				}
			}
			con.close();
		} catch (Exception e){
			System.out.println(e);
		}
	}