First draft of MinCut program