almost complete implementation of network manager