modified function ...vertex_id