Meredith Grey has gone through a lot in Grey’s Anatomy, and in season 6 she donated part of her liver to her estranged father – and there was a big behind-the-scenes reason for that. Created by Shonda Rhimes, Grey’s Anatomy debuted on ABC in 2005 as a mid-season replacement. However, the series was so well-received by both critics and viewers that it has lived on for over 10 seasons and shows no signs of stopping soon – even if most of its original characters are now gone.

Grey’s Anatomy follows the basic premise of medical dramas: the ups and downs of surgical interns, residents, and attendings as they do their best to balance their personal and professional lives, which more often than not end up overlapping. The series is led by Meredith Grey (Ellen Pompeo), who began as an intern and has now become the head of general surgery at Grey Sloan Memorial Hospital. Many of her friends and colleagues have now left the show, as have her parents, with whom she had a complicated relationship. At one point, however, she helped her father get a liver transplant, but more than being a good-hearted act, it was a necessary move for the show.

Related: Best TV Shows Of The Decade

In season 6 episode “Tainted Obligation”, Meredith’s father, Thatcher Grey (Jeff Perry), arrived at the hospital vomiting blood. It was revealed that he had cirrhosis and needed a liver transplant – but in order to be put on the list, he had to be sober for at least a year, and he had only been clean for 90 days. Lexie (Chyler Leigh) wasn’t a viable candidate, but Meredith was, so she asked her to do it for their father. Meredith eventually agreed, though not for Thatcher, but for Lexie’s sake. Meredith underwent the surgery, which was a success for both her and Thatcher, and she spent weeks in bed, recovering. The liver transplant storyline was added to Meredith’s arc because Ellen Pompeo was pregnant, and her pregnancy wasn’t written into the character.

Lexie with Thatcher in his hospital bed on Grey's Anatomy

As it happens in many TV shows when an actress is pregnant and it’s not made part of the character, the production crew has to get creative in order to cover it. Grey’s Anatomy used different angles and had Pompeo standing behind furniture or covering her belly with a prop, but it got to a point where all that wasn’t going to do the trick anymore. The writers then came up with the liver transplant storyline, allowing Pompeo to be in bed for most of it and go on maternity leave without the audience wondering what happened to Meredith – she was just recovering from the surgery.

Although the writers of Grey’s Anatomy are not the best when handling the absences and departures of their main characters, with their go-to solution being killing them, Meredith’s absence due to Ellen Pompeo’s pregnancy was well managed, even if the liver transplant story seemed strange to some. Ultimately, it added to her already complicated relationship with her father, with whom she managed to make amends just before he died.

Next: Grey's Anatomy: What "You're My Person" Line Really Means