now we can query the db to find the intermediate node to connect the outside nodes. This makes the display much more beautful