update mincut to use phi data structure lib