add dinic method