updated the data model whenever a Vertex moves