A nine-year-old dachshund suffering from an unusually large brain tumor just got a new lease on life thanks to the powers of 3D-printing technology.

What started as a small bump on Patches’ head turned out to be a major ordeal for a family in Williamsport, Pennsylvania.

In just a few months, the aggressive brain tumor spread through the dog’s skull, growing to the size of an orange, reports the Canadian Press. Desperate for help, the family was told to seek out the advice of Michelle Oblak, a veterinary surgical oncologist from the Ontario Veterinary College at the University of Guelph, who’s been using 3D-printing technology to treat dogs.

Normally in a case such as this, the tumor and a portion of the skull would be removed, and a titanium mesh fitted in place, Oblak told the Canadian Press. Instead, Oblak and her colleagues used a new procedure in which a 3D-printed skull cap is specially fitted for the canine patient, which the researchers claim is more precise and less costly than conventional methods. Incredibly, the titanium cap replaced 70 percent of Patches’ skull, which had to be removed during surgery. Oblak said researchers in the UK have done something similar, but on a “significantly” smaller scale.

The first step in the process was to perform CT scans of Patches’ head and tumor. Using software, Oblak and her colleagues then used this data to simulate the surgery, cutting out the tumor from the dog’s virtual skull. Once complete, the researchers were able to map out the dimensions of the 3D skull cap, including the location of holes for screws. Oblak said there was “very little room for error,” saying the plate wouldn’t fit if their measurements were off by more than two millimeters. These schematics were then sent to ADEISS, a medical-grade 3D printing company, which produced the custom-fit titanium skull cap.

On March 23, Patches underwent four hours of surgery in which her tumor and well over two-thirds of her skull were removed. A mere 30 minutes after waking, Patches was up and walking—and eager for an outdoor pee break, the Canadian Press reports. Oblak, who’s writing a report on the procedure, says Patches is now cancer free.

Danielle Dymeck, the owner of the dog, is delighted that the surgery was a success, despite the fact that Patches now has a permanently crooked ear.

Sadly, Patches is having to deal with another serious, but unrelated, health issue. The Canadian Press reports that one week after the surgery, Patches slipped a disc in her lower back and is now paralyzed in her hind legs. She refuses to use a wheelchair, preferring instead to pull herself forward with her two front legs.

Ah, when it rains it pours—even when you’re a dog.