use index of vertex to instead vertex id