initial regression test and refactored the topology interface

move constant after import.