This week NASA’s Mars Opportunity rover celebrated its 12 year anniversary on the red planet. What’s truly remarkable about this is the fact that the rover was only designed to operate for about 90 days.

Due to helpful unforeseen surface conditions and few creative software changes, NASA has been able to keep Opportunity alive and operational to this day.

After a six-and-a-half month journey from Earth, Opportunity entered the Martian atmosphere and used a parachute, retrorockets, and a cocoon of airbags to land safely on the surface back in January of 2004.

One of the reasons NASA believed the rover would only function properly for 90 Martian days was because of the extreme level of dust on Mars. This dust was predicted to build up on Opportunity’s solar panels and eventually, the rover would be unable to receive power.

Receiving solar power on Mars, which is 50 percent farther away from the Sun than Earth, was a known challenge even without the dust. NASA designed Opportunity’s solar panels to be as wide as possible in order to collect as much sunlight as it could. Even so, the lifetime of Opportunity was measured in days, perhaps months, but certainly not years.

Luckily, a surprising thing happened: every once in a while, whirling columns of air, or “dust devils,” swept over the rover and cleaned off the coating of dust from the solar panels.

This was a godsend to Opportunity and the NASA team who operated it. Dust build up would continue to be a challenge, but Martian dust devils have helped keep the rover’s lights on.

Collecting sufficient solar power wasn’t the only problem Mars threw NASA’s way. In its first year, Opportunity found itself slightly buried in a sand dune. Engineers and scientists at NASA’s Jet Propulsion Laboratory recreated the scenario with an Opportunity mock-up and identified a sequence of wheel rotations that would ultimately set the rover free.

In addition to hardware issues, Opportunity’s software has required a few upgrades over the years. NASA had to perform remote software updates to improve the rover’s visual detection, photography, and hazard detection capabilities.

Sending a rover all the way to Mars is expensive. It’s a fraction of the price of sending a human there, but it still cost NASA $400 million to build Opportunity and get it on the surface. Squeezing more science out of that expensive rover helps enable NASA to justify the time and money it took to get it there.

The fact that NASA has kept the rover operational for 12 years is a feat of engineering and ingenuity, but not everyone agrees that NASA should keep it running. It costs about $14 million per year to operate Opportunity and it’s just not as capable as it once was.

Two of Opportunity’s scientific instruments no longer work, its joints occasionally lock up, and it experiences periods of amnesia due to problems with its flash memory.

Even so, the rover continues to accomplish useful scientific work. In recent years, researchers used Opportunity to examine a series of large craters in order to get a look at older layers of Mars’ history.

The rover has also been one of the keys to understanding the role of liquid water in the planet’s past, which will help scientists learn if life ever existed there. Impressively, Opportunity has achieved the record of traveling the longest distance on another planet and continues to send back never before seen images of Mars.

While it may be a fixer-upper after spending over a decade in harsh Martian conditions, it remains a crucial asset to NASA as well as our understanding of Mars. After 12 years, Opportunity pushes onward.