made list of pointers to change value to vertexes with the same value