rewrote code to use a test topology