fix bug that iter will ignore the first vertex
using retry counter to loop until all vertex meet degree criteria