public static void back(double curMoney, int last) {
		if ((totalDis - stations[last].dis) <= (galCapacity * milesPerGal)
				&& curMoney != 0) {
			if (curMoney < min)
				min = curMoney;
		} else {
			for (int i = last + 1; i < stations.length; i++) {
				double dis = stations[i].dis - stations[last].dis;
				double fuelDis = galCapacity - (dis / milesPerGal);
				if ((noNext(i, last, galCapacity) || stop(galCapacity, dis))
						&& fuelDis >= 0)
					back(curMoney + 200 + (galCapacity - fuelDis)
							* stations[i].gallon, i);
			}
		}
	}