public void insert(Entity e) {
		if(nodes[0] != null) {
			int index = getIndex(e);
			if(index != -1) {
				nodes[index].insert(e);
				return;
			}
		}
		
		entities.add(e);
		
		if(entities.size() > MAX_OBJECTS && level < MAX_LEVELS) {
			if(nodes[0] == null) {
				split();
			}
			int i = 0;
			
			while(i < entities.size()) {
				int index = getIndex(entities.get(i));
				
				if(index != -1) {
					nodes[index].insert(entities.remove(i));
				}
				else {
					i++;
				}
			}
		}
	}