public void run(){
		long previousUpdate = 0;
		while (true){


			long timeElapsed = System.currentTimeMillis() - previousUpdate;
			if (timeElapsed > UPDATE_INTERVAL){

				synchronized (key) {

					player.step(everything);

					for(Entity e : this.entities){
						if(e instanceof Enemy){
							e.step(everything);
						}
						previousUpdate = System.currentTimeMillis();
					}

				}
			}
			else{
				try {
					Thread.sleep(5);
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
			}

		}


	}