public void run() {
		double oldTime = System.currentTimeMillis();
		double newTime = System.currentTimeMillis();
			
		while(running) {
			oldTime = newTime;
			newTime = System.currentTimeMillis();
			
			deltaTime = newTime - oldTime;
			FPS = (int)(1000.0 / deltaTime);
			
			update();
			screen.repaint();
			
			try {
				Thread.sleep(20);
			} catch(Exception e) {
				System.out.println("Failed to sleep");
			}
		}
	}