@Override
	public String eval(ArrayList<String> args) throws InvalidInputException {
		if(args.size() != numOfArgs) throw new InvalidFunctionUseException(name);
		
		String stringToSolve = new String(formula);
		
		//add in args
		switch (numOfArgs) {
		case 4:
			while(stringToSolve.contains("(A4)"))
				stringToSolve = stringToSolve.replace("(A4)", "("+args.get(3)+")");
		case 3:
			while(stringToSolve.contains("(A3)"))
				stringToSolve = stringToSolve.replace("(A3)", "("+args.get(2)+")");	
		case 2:
			while(stringToSolve.contains("(A2)"))
				stringToSolve = stringToSolve.replace("(A2)", "("+args.get(1)+")");
		default:
			while(stringToSolve.contains("(A1)"))
				stringToSolve = stringToSolve.replace("(A1)", "("+args.get(0)+")");
			break;
		}
		System.out.println("with args: "+stringToSolve);
		
		return Solver.solveString(stringToSolve);
	}