public void run() {
		Thread thisThread = Thread.currentThread();
		while (runner == thisThread) {
			try {
				nextpoints();
				runtotal++;

				// do more calculations per paint later on
				if (runtotal > 400) {
					nextpoints();
					nextpoints();
				}

				long denom = rejected + accepted;
				if (denom > 0)
					percent_accepted = (int) (accepted * 100 / denom);
				else
					percent_accepted = 0;

				accepted = rejected = 0;

				if (runtotal % 5 == 0) {
					long curtime = System.currentTimeMillis();

					String strStatus = "Pass: " + runtotal + " - "
							+ ((curtime - oldtime) / 1000) + "s Accept: "
							+ percent_accepted + " - "
							+ ((int) (avg_score[0] * 100)) + " "
							+ ((int) (avg_score[1] * 100)) + " "
							+ ((int) (avg_score[2] * 100));
					System.out.println(strStatus);

					oldtime = curtime;

					updateHistogram();

					calcAvgScore();
					Thread.sleep(100);
				}
				Thread.sleep(10);
				painter.repaint();

				// fading for LOW_RES_PASSES
				if (runtotal > 100 && runtotal <= 700 && runtotal % 50 == 40) {
					ensureBlack();
					System.out.println("dark pass, limit is: " + limit
							+ " quad: " + (quad - 14));
				}
			} catch (Exception e) {
				e.printStackTrace();
				int max_depth = Math.max(depth_green,
						Math.max(depth_blue, depth_red));
				img_cache = new double[max_depth][2];
			}
		}
		System.out.println("run() exited");
	}