new stuff for graph merging and voronoi. TMB