fixed connected vertices program