mostly finished the generic part of networking