networking code altered for testing