Wrote constructors for the network class