Uncommented Dinic added