add a lot of network control and server code