testing network detection adn inserting