accomplish large part of networkHandler