Embattled aviation giant Boeing has announced an upgrade to the flight control software of its grounded 737 MAX aircraft, which is linked to two fatal crashes that killed nearly 350 people in recent months.

Boeing gathered hundreds of pilots and reporters to unveil the changes to the MCAS stall prevention system, which has been implicated in the crashes in Ethiopia and Indonesia, as part of a charm offensive to restore the company's reputation.

"We are going to do everything to make sure that accidents like this don't happen again," Mike Sinnett, Boeing's vice president of product strategy, told reporters at a factory in Washington state.

In Washington DC, the head of the US air safety agency faced harsh questions from senators over its relationship with and oversight of Boeing.

Dan Elwell, the acting head of the Federal Aviation Administration, defended his agency, but acknowledged that, as systems become more complex, the FAA's "oversight approach needs to evolve".

Ahead of the tough questioning, the company launched a campaign to convince the flying public that it is addressing the issues with the 737 MAX, including a fix to the Maneuvering Characteristics Augmentation System (MCAS) implicated in the deadly crashes.

Boeing announced the software changes, which Mr Sinnett said were developed "after months of testing and hundreds of hours", at the company's massive factory in Renton, Washington, and offered reassurances.

The MCAS, which lowers the aircraft's nose if it detects a stall or loss of airspeed, was developed specifically for the 737 MAX, which has heavier engines than its predecessor.

Boeing's vice president of product strategy, Mike Sinnett

Among the changes, the MCAS will no longer repeatedly make corrections when the pilot tries to regain control, and will automatically disconnect in the event of disagreements between the two "angle of attack" (AOA) sensors, the company said.

The initial investigation into the October Lion Air crash in Indonesia, which killed all 189 people on board, found that one of the AOA sensors failed, but continued to transmit erroneous information to the MCAS.

Boeing will also install a warning feature - at no cost - called a "disagree light" to indicate to the pilot when the left and right AOA sensors are out of sync.

Southwest is one of the US airlines that flies the now-grounded 737 MAX aircraft

The company is also revising pilot training, including for those already certified on the 737, to provide "enhanced understanding of the 737 MAX" flight system and crew procedures.

US pilots complained after the Lion Air crash that they had not been fully briefed on the system.

But despite the revisions, in Washington, Mr Elwell seemed to cast doubt on the MCAS as the culprit, saying that data collected from 57,000 flights in the US since the MAX was introduced in 2017 showed not a single report of an MCAS malfunction.

The kind of flaw it could create is something "pilots are trained from day one" how to handle, he said.

He faced questions about how certification for the MAX was handled and why he did not immediately ground the aircraft after an Ethiopian Airlines 737 MAX 8 crashed shortly after takeoff near Addis Ababa on 10 March, killing all 157 people on board.

The delay has given rise to suspicions of a too-cosy relationship between regulators and the American aircraft manufacturer.

Despite being the last country to ground the Boeing 737 MAX fleet this month, the United States, and Canada, "were the first countries to ground the plane with data for cause and purpose," Mr Elwell told a Senate committee.

The decision came after data showing the flight track were "refined" and together with information from the crash site showed "it was very similar to Lion Air and there was very possibly a link between the two flights".

He called the FAA "the gold standard" for aviation safety around the globe, and denied the agency was lax in reviews of the new systems in the MAX, even though certification of some elements, including the MCAS, were eventually delegated to Boeing.

Even so, the FAA was "directly involved" in the safety review of the MCAS, Mr Elwell said. "The certification process was detailed and thorough."

At a separate hearing, Transportation Secretary Elaine Chao said she was "concerned about any allegations of cosiness with any company", but noted that allowing Boeing to handle some of its own safety certifications was necessary because the FAA "can't do it on their own".

She said she has ordered the Transportation Department's inspector general, Calvin Scovel, to investigate the MAX certification, and Mr Scovel in turn noted various concerns with FAA inspectors and procedures.

But a Boeing official countered that wholesale changes were not needed, saying: "In general, the process has worked."