update for graph cut part