restore previous functionality of collectVertices