network connection API changes and unit tests (not yet working)