modified function ...get_vertex_id