Setting public the constructor of network class