added algorithm of Stoer and Wagner