Added findOptimalCut