global min-cut is working and tested