scaffold max flow