change the way of counting remove vertices