//replaced
  if ( depth > 200 )
     {
	return -1;
    }

//with
 if ( depth > 200 )
     {
	  int intermed, count;
  count=0;
	for(i=0;i<Mesh->GetNumberOfCells();i++){
	    tetra = (vtkTetra*)Mesh->GetCell(i);
	   
	    for ( j=0; j < 4; j++ ) //load the points
	    {
		Mesh->GetCell(i)->Points->GetPoint(j,p[j]);
	    }
	    vtkTetra::BarycentricCoords(x, p[0], p[1], p[2], p[3], b);
	    
	    if(b[0]>=-0.0000001 && b[1]>= -0.0000001&& b[2]>=-0.0000001 && b[3]>=-0.0000001) {
		cout << i << endl;
		intermed=i;
		count++;
		//return(i);
	    }
	}
	if(count>0) {
	    cout << count << ": " << intermed<<endl;
	    return(intermed);
	}
	cout << "IT HAPPENED AGAIN!\n";
	return -1;


    }
