TOKYO -- The 2018 Winter Olympics in Pyeongchang, South Korea, drew to a close on Sunday having produced some iconic sporting moments. But the event has also made it abundantly clear that much work needs to be done in the fight against doping before Tokyo hosts the Summer Games in 2020.
Doping scandals have been a part of the Olympics for decades, and the latest installment has been no exception.
Several athletes have been caught cheating, including Japanese short-track speed skater Kei Saito, who tested positive for the banned substance acetazolamide.
Saito has denied taking the drug intentionally and no official decision has been made regarding the case, but it has dealt a further blow to his country's reputation. It came shortly after a somewhat bizarre incident in which a Japanese kayaker spiked the drink of a rival so that he would fail a drugs test.
Anti-doping officials worldwide face a daunting task to keep up with the development of doping techniques. And the challenge is only set to get harder.
A significant problem is that catching cheats is no longer solely a matter of detecting the use of substances. Some athletes are now prepared to alter their blood, inject genes and even stimulate their brains in order to gain an unfair advantage.
Canadian speed skating fans will no doubt have been thrilled to see Samuel Girard dramatically take gold in the 1,000-meter short track final on Feb. 17, but not everyone was overjoyed.
"That should have been one of our guys," said a Russian woman, referring to Viktor Ahn, who won gold representing Russia in the event four years ago in Sochi.
The naturalized Russian citizen had previously won three golds at the 2006 Winter Olympics in Turin, Italy, while competing for South Korea.
But the decision to switch allegiance may well be one he now regrets as he has missed out on the chance to add to his medals in the country of his birth. Russia was banned from competing after revelations of a state-sponsored doping program.
A 150-page report detailing the scheme was released in 2016 by independent investigator Richard McLaren.
The report, commissioned by the World Anti-Doping Agency, accused the country of systematically using performance-enhancing substances at the Sochi Olympics and other events, including the 2013 World Athletics Championships in Moscow. It claimed that more than 1,000 athletes had been involved or benefited from the scheme.
In light of the findings, the International Olympic Committee banned Russia from participating as a national team in Pyeongchang.
In November 2017, Kenya's Jemima Sumgong, who won gold in the women's marathon at the 2016 Summer Games in Rio de Janeiro, was suspended from all competitions for four years after testing positive for the banned substance erythropoietin, or EPO.
"Erythropoietin can be detected easily through testing," said Masato Okano, the head of LSI Medience's Anti-Doping Laboratory in Tokyo, Japan's only WADA-approved testing organization.
"But there is a technique that has the effect of promoting endurance similarly and cannot be detected easily," he said.
The organization conducts around 7,000 tests annually and will provide its services at the 2020 Tokyo Olympics. It also carried out tests at the 1998 Winter Olympics in Nagano and the 2002 soccer World Cup in Japan and South Korea.
Like many other testing organizations, Anti-Doping Laboratory is extremely concerned about new techniques that do not involve taking banned substances.
One major challenge is tackling gene doping. Dr. Olivier Rabin, who supervises research on testing techniques at WADA's Montreal headquarters, has warned that if the issue is not dealt with quickly, it will be too late.
Rabin has received a report on a groundbreaking new method of treating kidney failure patients that is now in the clinical testing stage. The method involves injecting the body with genes that produce EPO.
The drug helps increase the number of red blood cells and is normally used to treat patients suffering from kidney failure and anemia. The substance is produced naturally in the kidneys of a healthy person and it is impossible to distinguish this from EPO that has been produced by injected genes.
It will therefore be necessary to develop a completely different testing method, such as one that involves tracing the remains of genes or viruses.
Another problem is blood doping, which involves drawing blood in the days before an event and injecting it back into the body just before competing. This boosts the volume of blood in the athlete's body and enhances endurance.
Monitoring blood samples regularly on what is called an "athlete biological passport" can show evidence of the practice, such unnatural changes to blood composition.
Athletes are required to report their whereabouts to WADA and are subject to out-of-competition tests. But unlike when testing for substances, "there is no way to directly detect blood doping because it is their own blood," said Okano.
This means there are numerous ways someone can contest an allegation made against them and many cases are taken to the Court of Arbitration for Sport in Lausanne, Switzerland.
An athlete could claim to be suffering from anemia, have donated blood or received a transfusion. Even an injury could be cited as a reason for abnormalities.
They could also claim that samples had been tampered with while being transported, meaning they have to be kept under tight security.
Given how advancements in medical technology can be misappropriated, it has become essential for WADA to engage with the pharmaceutical industry.
Swiss drugmaker Roche and Japan's Astellas Pharma have been providing the association with information relating to compounds of medicines under development that could be misused for doping.
WADA confidentially relays the data to some 30 accredited testing organizations around the world to further research on detection methods.
A report made at a symposium at the University of Tokyo in October highlighted a new problem.
Athletes' reaction speed can be enhanced by stimulating the brain electrically, in what has been named "brain doping," the report said.
"As long as sports exist, doping will not disappear," said Hidenori Tomozoe, a professor at Tokyo's Waseda University who specializes in sports ethics.
In a survey conducted in the U.S., more than half the athletes polled said they would dope in order to win, even if they knew the side effects could kill them years later.
With just over two years to go to the 2020 Tokyo Olympics, the race is on to develop testing methods that can detect the increasingly sophisticated techniques some athletes will use to cheat.