public static void main(String[] args) {
		long time=System.nanoTime();
		System.out.println("parameter\t\tms\t\tmsms");
		int totalFailCount =0;
		int currentFailCount =0;
		int total =0;
		String warnings="";
		for (int i =0; i < ARGS.length; i++) {
			String[] msmsArgs =ARGS[i];
			double[] correctResults =TEST_VALUES[i];

			AveragesVars av =new AveragesVars();
			ArrayList<StringStatsCollector> list =new ArrayList<StringStatsCollector>();

			list.add(av);

			for (int j =0; j < msmsArgs.length; j++) {
				System.out.print(msmsArgs[j] + " ");
			}
			System.out.println();

			String[] addT =new String[msmsArgs.length + args.length + 1];
			System.arraycopy(msmsArgs, 0, addT, 0, msmsArgs.length);
			System.arraycopy(args, 0, addT, msmsArgs.length, args.length);
			addT[addT.length - 1] ="-b";
			System.out.println(Arrays.toString(addT));
			ProgressControl pg =new ProgressControl() {
				private int reps;
				private AtomicInteger count =new AtomicInteger();
				private int percent;

				@Override
				public void setReps(int reps) {
					this.reps =reps;
				}

				@Override
				public void iterationComplete() {
					int count =this.count.incrementAndGet();
					if (count == 1) {
						System.out.println("|===================|===================|===================|===================|");
					}

					if ((double) count * 80 / (reps) >= percent + 1) {
						percent++;
						System.out.print("*");
					}
					if (percent >= 80) {
						System.out.println();
					}
					// System.out.println(count);
				}

				@Override
				public boolean isCanceled() {
					return false;
				}

				@Override
				public void error(Exception e) {
				}
			};
			at.MSLike.main(addT, list, System.out, pg);

			double[] msmsResults =av.getAllStats();

			System.out.println("Tree Height Mean:" + correctResults[0] + "\t" + msmsResults[0]);
			System.out.println("Tree Height Var:" + correctResults[1] + "\t" + msmsResults[1]);
			System.out.println("Tree Length Mean:" + correctResults[2] + "\t" + msmsResults[2]);
			System.out.println("Tree Length Var:" + correctResults[3] + "\t" + msmsResults[3]);
			System.out.println("SegSites Mean:" + correctResults[4] + "\t" + msmsResults[4]);
			System.out.println("SegSites Var:" + correctResults[5] + "\t" + msmsResults[5]);
			if (correctResults.length > 6) {
				System.out.println("Singletons Mean:" + correctResults[6] + "\t" + msmsResults[6]);
				System.out.println("Singletons Var:" + correctResults[7] + "\t" + msmsResults[7]);
			}
			if (checkApprox(correctResults, msmsResults, .1)) {
				System.out.println("PASS");
				currentFailCount=0;
			} else {
				currentFailCount++;
				totalFailCount++;
				System.out.println("FAIL " + currentFailCount);
				if (currentFailCount < 4) {
					i--;// try again.
				} else {
					warnings+="\n\t A test has failed 4 times! "+Arrays.toString(addT);
					currentFailCount =0;
				}

			}
			System.out.println();
			total++;
		}
		System.out.println("Failed " + totalFailCount + " out of " + total+"\n"+warnings);
		System.out.println("Test took "+(System.nanoTime()-time)*1e-9+" seconds to complete");
	}