build the network