Added functiuon "remove critical edges" to be implemented.