nice voronoi check, cleaned up the code somewhat