addVertex() now returns the index that the vertex was added at, speeded up ninetails sample problem