loopfinder interface impel and some tests.