working version of voronoi diagram