private void run() {

		initialize(); 

		while (true) {

			long time = System.currentTimeMillis();

			update();

			render();

			time = (1000/fps) - (System.currentTimeMillis() - time);

			if (time>=0) {
				try {
					Thread.sleep(time);
				} catch (Exception e) {}
			}

		}

	}