private void rungeKutta(double h) {
		Vector3D[] kv1 = new Vector3D[bodies.size()];
		Vector3D[] kr1 = new Vector3D[bodies.size()];
		Vector3D[] kv2 = new Vector3D[bodies.size()];
		Vector3D[] kr2 = new Vector3D[bodies.size()];
		Vector3D[] kv3 = new Vector3D[bodies.size()];
		Vector3D[] kr3 = new Vector3D[bodies.size()];
		Vector3D[] kv4 = new Vector3D[bodies.size()];
		Vector3D[] kr4 = new Vector3D[bodies.size()];

		for (int i=0; i < bodies.size(); i++){
			Body b = bodies.get(i);
			kv1[i] = getAcceleration(b, b.position);
			kr1[i] = b.velocity;
			kv2[i] = getAcceleration(b, b.position.clone().add((kr1[i].clone()).multiply(h/2d)));
			kr2[i] = kv1[i].clone().multiply(h/2d);
			kv3[i] = getAcceleration(b, b.position.clone().add((kr2[i].clone()).multiply(h/2d)));
			kr3[i] = kv2[i].clone().multiply(h/2d);
			kv4[i] = getAcceleration(b, b.position.clone().add((kr3[i].clone()).multiply(h)));
			kr4[i] = kv3[i].clone().multiply(h);
		}
		physicsLock.lock();
		for (int i=0; i < bodies.size(); i++){
			Body b = bodies.get(i);
			b.position.add(((kv1[i].add((kv2[i].add(kv3[i])).multiply(2))).add(kv4[i])).multiply(h/6d));
			b.velocity.add(((kr1[i].add((kr2[i].add(kr3[i])).multiply(2))).add(kr4[i])).multiply(h/6d));
			if (b.hasTrail){
				b.trail.makeTrail();
			}
		}
		physicsLock.unlock();
	}