change code of maxflow : struct -> class