more refactoring of network adapter