removed grid dependence of result, changed vertex_relabel to vertexRelabel