writing network class now