The Ayrshire 10-year-old who wanted her leg amputated
Ruby Hamilton made a decision in December which was much bigger than the usual dilemmas facing a 10-year-old.
The Ayrshire schoolgirl agreed to have her lower right leg amputated and then repurposed as a knee joint.
In an operation called rotationplasty, her ankle and foot were removed, turned around and reattached at her knee.
What seems like an extreme course of action will completely change the football-loving youngster's life - and she had no doubts about going through with it.
Instead of cutting short playtimes due to pain and having to rest in a wheelchair, Ruby will be fitted with a new prosthetic limb allowing her to run jump and finally play football with her friends.
'Nothing they could do'
Ruby, from Drongan, has a rare condition called proximal femoral focal deficiency (PFFD), which affects just one in 40,000 children.
Her knee had no cruciate ligament and surgeons told her family there was nothing they could do to save the knee or stabilise it.
In a bid to find a long-term solution to her condition, talk turned to amputation.
Ruby's mum, Maddy Hamilton, told BBC Scotland's Mornings with Stephen Jardine programme: "It was a long process. I knew when she was born there was something definitely not quite right with the leg.
"She was diagnosed with hip dysplasia when she was three but after she had an operation to correct that I noticed there was a difference in her leg lengths and I didn't think there should be."
After the PFFD diagnosis, the family discussed treatment and rotationplasty came up as an option.
The operation had only been attempted six times in the UK and Ruby would be the seventh.
Maddy said: "Visually it was shocking to see at first.
"Down where Ruby would have had her knee she has her foot on backwards. Her foot and ankle now work as her knee.
"She has never had a working knee joint before so we are very lucky now."
What is rotationplasty?
In the operation, the knee and part of the thigh are removed.
The part of the leg from below the knee is then attached to the part of the leg above the knee, with the foot facing backwards.
The limb is rotated because the ankle flexes in the opposite direction to the knee.
The ankle joint now acts as a knee. The patient can still move the foot and wiggle the toes.
An artificial lower leg and foot is then fitted. The benefit to the patient is that they have a functioning knee joint and can run and jump.
Rotationplasty is also used in cancer patients who may have had tumours removed around the knee area.
Ruby will be fitted with a prosthetic lower leg next week which will give her a working knee joint.
Maddy said: "She will be able to ride a bike and climb and there will be nothing she won't be able to do with this. She will have better mobility than she would ever be able to have."
The procedure will change Ruby's life. Before she tried her best to play with friends but would not be able to stay on her leg for long before feeling pain in her knee. Mum Maddy would have to take her wheelchair along on play dates for when she was tired and sore.
Now Ruby has plans for what she wants to do.
She said: "I want to join the girls' football team."
Maddy said: "She is actually the sportiest one in the family. I am hoping this will allow her have a normal life - life without a wheelchair.
"We never knew how difficult life in a wheelchair was. This will allow Ruby to go off and lead her life like a normal girl."
Ruby was made the central point of the decision-making process with regard to her treatment.
Right up until the day she went for surgery she was asked if she still wanted to go through with it.
Maddy said: "The consultant spent a lot of time explaining everything to make sure she knew exactly what this was going to be.
"But he also let her know she would be absolutely fine. We also met someone who had had the surgery. Right up until the morning, we asked her if she was sure, it wasn't too late to change her mind. But she was determined."
The operation took eight hours but felt like more to her parents.
Maddy said: "It was a worrying time, but the consultant kept us updated during the surgery.
"She came out just great - straight out of recovery she was awake and giving a thumbs up and wiggling her toes already."
The family all hope that the operation and the new leg will be the start of a life-changing year for Ruby.
Mum Maddy said: "The younger you get it, the quicker you'll adapt.
"Ruby is young and she will come on just fine."