How the Navy came to protect cargo ships