add logic to calculate reduced network. Currently just prints nodes