minimal cycle basis working (w/ test)