factor out minCut
this might help :)
Merge pull request #8 from aaylward/fact

Factor out minCut