min-cut working