initial code for the main network class