in Topology, add @dist and modify debug print.