private double getDoubleArg(String base, int argNumber) throws Exception{
		int currentIndex = 0;
		int argCount = 0;
		while(currentIndex < base.length()){
			int nextComma = base.indexOf(',', currentIndex);
			if (nextComma < 0) {
					nextComma = base.length();
			}
			if (argCount == argNumber){
					return Double.parseDouble(base.substring(currentIndex, nextComma));
			}
			argCount ++;
			currentIndex = nextComma + 1;
		}	
		throw new Exception("Couldn't get arg " + argNumber);
	}