James Boysen was falling apart when he went into surgery at Houston Methodist Hospital two weeks ago. His pancreas was damaged, his kidney was deteriorating and he had a radiation wound in his head that refused to heal.

The 55-year-old left the hospital Thursday with a new pancreas, new kidney, new scalp, new skull and “a new lease on life,” in the words of one of his surgeons.

Boysen is believed to be the world’s first recipient of a skull and scalp transplant — a difficult and delicate surgery that involved grafting new bone and skin onto his head, reconnecting tiny blood vessels the width of a pinhead in order to keep blood flowing to the transplant. Doctors said it was an innovative — and the only — solution to Boysen’s array of ailments.

Boysen had been battling various health problems for more than two decades. In 1992, he received a kidney and pancreas transplant due to complications from diabetes he had since age five, according to the Associated Press. The immunosuppressive drugs he took to prevent his body from rejecting the new organs made him vulnerable to cancer, and he eventually developed leiomyosarcoma, a rare disease that affects the body’s “smooth,” or involuntary, muscles. In his case, the cancer’s targets were the cells just under his scalp— the ones that make your hair stand on end when you’re afraid.

Radiation therapy to treat the cancer damaged a large part of Boysen’s skull, and because he was taking immunosuppressants for his transplants, his body struggled to repair the damage — it was a “perfect storm that made the wound not heal,” he told the AP. Years later, when the new pancreas and kidney started to fail, doctors knew they couldn’t replace them while Boysen still had an open wound.

“I couldn’t get the transplant for my organs without fixing my scalp, and I couldn’t fix my scalp without the transplant for the organs so it was a Catch-22,” he said at a news conference Thursday.

His doctors’ solution? Replace everything at once.

They reached that conclusion in 2011. But first they needed to figure out how it could be done and find a donor who could provide each of the organs Boysen required. So they waited for years, until on May 21, news came that LifeGift, the organ and tissue donation non-profit, had found a candidate.

In less than a day, Boysen was wheeled into surgery. A team of a dozen doctors from MD Anderson Cancer Center and Houston Methodist took part, alongside about 40 other health workers, according to the AP. For 15 hours they worked to carefully remove parts of Boysen’s scalp and skull, replacing them with a 10-by-10-inch skull graft and a 15-inch-wide piece of skin. Then they transplanted Boysen’s pancreas and kidneys.

“It’s done under an operating microscope with little stitches about half the thickness of a human hair, using tools like a jeweler would use to make a fine Swiss watch,” Michael Klebuc, who led the Houston Methodist plastic surgery team, told the AP.

The final transplant looks like a cap of skin has been sewn onto the top of Boysen’s head, starting high on his forehead and encircling his entire skull. Which is exactly what happened.

Boysen already has sensation in his scalp, he told the AP, and his new head was reportedly sweating in the hot room. He also joked that he has more hair now then he did at 21.

“I’m still kind of in awe of it,” he said at a Thursday a news conference.