Change selection logic to include any number of vertices.