initial regression test and refactored the topology interface

Same. Let's make it in another PR to make this clear.