implemented more stuff for network code