docs: void split(treeNode parent, Point newCentre, int newCentreIndex){
  		
  		//loop counter variable
  		int i;
  
  		//1. Counts how many points belong to the new and how many points belong to the old centre
  		int nOld = 0;
  		int nNew = 0;
  		for(i=0;i<parent.n;i++){
  			Point centre = determineClosestCentre(parent.points[i], parent.centre, newCentre);
  			if(centre == newCentre){
  				nNew++;
  			} else {
  				nOld++;
  			} 
  		}
  
  		//2. initalizes the arrays for the pointer
  		
  		//array for pointer on the points belonging to the old centre
  		Point[] oldPoints = new Point[nOld];
  
  		//array for pointer on the points belonging to the new centre
  		Point[] newPoints = new Point[nNew];
  
  		int indexOld = 0;
  		int indexNew = 0;
  
  		for(i=0;i<parent.n;i++){
  			Point centre = determineClosestCentre(parent.points[i],parent.centre,newCentre);
  			if(centre == newCentre){
  				newPoints[indexNew] = parent.points[i];
  				newPoints[indexNew].centreIndex = newCentreIndex;
  				indexNew++;
  			} else if(centre == parent.centre){
  				oldPoints[indexOld] = parent.points[i];
  				indexOld++;
  			} else {
  				//printf("ERROR !!! NO CENTER NEAREST !! \n");
  			}
  		}
  
  		//left child: old centre
  		treeNode lc = new treeNode(nOld, oldPoints, 
  						parent.centre, parent);
  		/*lc.centre = parent.centre;
  		lc.points = oldPoints;
  		lc.n = nOld;
  
  		lc.lc = null;
  		lc.rc = null;
  		lc.parent = parent;
  
  		treeNodeTargetFunctionValue(lc);*/
  		
  		//right child: new centre
  		treeNode rc = new treeNode(nNew, newPoints, newCentre, 
  							 parent);
  		/*rc.centre = newCentre;
  		rc.points = newPoints;
  		rc.n = nNew;
  
  		rc.lc = null;
  		rc.rc = null;
  		rc.parent = parent;
  
  		treeNodeTargetFunctionValue(rc);*/
  
  		//set childs of the parent node
  		parent.lc = lc;
  		parent.rc = rc;
  
  		//propagate the cost changes to the parent nodes
  		while(parent != null){
  			parent.cost = parent.lc.cost + parent.rc.cost;
  			parent = parent.parent;
  		}
  
  	}