Modified to network thread