The Martian desert is blanketed in jagged rocks, slicing and puncturing the Curiosity rover’s metallic wheels.

If the wheels fail so does the rover, so scientists at NASA’s Jet Propulsion Laboratory sent the car-sized robot a large batch of instructions called “traction control,” which will allow the rover to autonomously adjust the speed of its six wheels as it traverses the rock-strewn land. On level ground, the rover’s wheels all spin at the same speed, but this becomes a problem on rocky terrain, when wheels can be pushed or pulled into sharp rocks.

“The wheel wear has been cause for concern, and although we estimate they have years of life still in them, we do want to reduce that wear whenever possible to extend the life of the wheels,” said Art Rankin, the NASA team lead for the software, in a statement.

NASA scientists have been perfecting the code for 18 months, which included running the software through a mock Curiosity rover here on Earth. The rover ran over the six-inch metal sensors shown in the above NASA-shot GIF, and the new instructions reduced the pressure put on the wheels by as much as 20 percent. As the rover slowly rumbles along at about 1 centimeter per second, the software gets guidance from the rover’s suspense system, so it knows how each wheel is situated on the terrain. Then it calculates the best speed to avoid slipping, limiting the chance that any one wheel gets forced into a razor-edged rock.

In March, NASA scientists stopped the rover for a regularly-scheduled check-up and found that some of the tread on its left-middle wheel had cracked apart, so it was prudent that NASA had already prepared to prolong the life of Curiosity’s wheels — and thereby the entirety of the rugged robot.

As of June 30, 2017, Curiosity had driven 10.44 miles over the course of 1,742 sols (also known as Martian days which are about 40 minutes longer than Earth days) since it touched down in the red desert on August 6, 2012. Barring any tire-crises, the rover will continue drilling into the ground and shooting rocks with lasers in its extraterrestrial pursuit for rocks that show signs of past, primitive life.

Photos via NASA/JPL