modified func ...get_vertex_id