add bad vertice detection