added max flow
added max flow