docs: protected TreeNode simpleInsert_(TreeNode p, int x_indx)
      {
  //        if(nearest_ancestor)
  //        {
  //            double[] dist_to_x = new double[p.numChildren()];
  //            for(int i = 0; i < dist_to_x.length; i++)
  //                dist_to_x[i] = p.getChild(i).dist(x_indx);
  //            IndexTable it = new IndexTable(dist_to_x);
  //            
  //            for(int order = 0; order < p.numChildren(); order++) //Line 1:
  //            {
  //                int q_indx = it.index(order);
  //                TreeNode q = p.getChild(q_indx);
  //                if(q.dist(x_indx) <= q.covdist()) //line 2: d(q,x)≤covdist(q)
  //                {
  //                    //3: q' ← insert_(q,x)
  //                    TreeNode q_prime = simpleInsert_(q, x_indx);
  //                    //4: p' ← p with child q replaced with q'
  //                    p.replaceChild(q_indx, q_prime);
  //                    //5: return p'
  //                    return p;
  //                }
  //            }
  //            //6: return rebalance(p, x)
  //            return rebalance(p, x_indx);
  //        }
  //        else
          {
              for(int q_indx = 0; q_indx < p.numChildren(); q_indx++) //Line 1:
              {
                  TreeNode q = p.getChild(q_indx);
                  if(q.dist(x_indx) <= q.covdist()) //line 2: d(q,x)≤covdist(q)
                  {
                      //3: q' ← insert_(q,x)
                      TreeNode q_prime = simpleInsert_(q, x_indx);
                      //4: p' ← p with child q replaced with q'
                      p.replaceChild(q_indx, q_prime);
                      //5: return p'
                      return p;
                  }
              }
              //6: return p with x added as a child
              p.addChild(new TreeNode(x_indx, p.level-1));
              return p;
          }
      }