You’ve still got plenty of golf and Zumba days ahead of you. But before your next round—or dance-off—you need a knee or hip replacement.

And, starting months in advance, you’ll need to prepare.

We asked an orthopedic surgeon for tips.

Is joint replacement right for me?

Start hereCall 833.203.9880

1. Stop risky habits.

“Joint replacement is now an option for everyone from 40-somethings to 90-year-olds. But preparation is essential,” says Mark Shekhman, MD, an orthopedic surgeon at the Bone & Joint Institute at Hartford Hospital.

Step one: Stop or change any habits that interfere with healing.

  • Stop smoking.
  • Drink less alcohol, or stop altogether.
  • Lose weight. (Your health team can help.)
  • If you have an underlying condition like diabetes or high blood pressure, get your numbers in excellent control.

“There are some risk factors that we can’t change, like having diabetes. But we can control the quality of the food we eat, and get our blood sugar levels stable and low enough to be safe,” says Dr. Shekhman.

> Related: Am I Too Old to Get My Knee or Hip Replaced? What to Consider at Age 70, 80 and Up

2. Start “pre-hab” for your knee or hip replacement.

“Preparing for surgery is like preparing to run a marathon,” says Dr. Shekhman. “If you just run it, you probably won’t do very well. The better you prepare, the easier the whole process will be.”

  • Work with a physical therapist to build your strength.
  • Add more protein to your diet: “Protein resupplies your body with the building blocks it needs to heal,” says Dr. Shekhman.
  • Start taking a supplement like a multivitamin.
  • Talk to your health team about other ways to improve your nutrition.

3. Prepare your home for a safe return.

If your bed is currently at the top of a spiral staircase, you’ll need to make other arrangements. It takes time to regain strength, balance and movement after a joint replacement.

  • Remove tripping hazards from the floor.
  • Consider installing safety devices like handrails.
  • Move a bed to the first floor.

“You want your home set-up to be convenient for you, and more importantly, safe,” says Dr. Shekhman.

> Want more health news? Text StartHere to 85209 to sign up for text alerts

4. Make a plan for pain management.

Pain is never a comfortable experience. But pain you weren’t expecting or prepared for is particularly distressing.

“Different people experience surgical pain differently with the exact same procedure. No matter what anyone tells you, it’s not realistic to expect no pain after surgery,” says Dr. Shekhman.

Your doctor can help you understand what to expect after a knee or hip replacement, and offer lots of tools for pain management.

5. Expect up to 12 months of recovery after a knee or hip replacement.

While the surgery for joint replacement only lasts an hour or two, it can take about a year for you to fully heal. A few advance arrangements can help those months fly by.

  • See a physical therapist for exercises to boost your muscles and range of motion.
  • Enlist family, friends or hired caregivers to help with transportation, daily activities and more.

Waiting for you on the other side? Your best quality of life.

“After some healing time, most patients are pleased that their joint pain has gone away, and they can return to their favorite activities feeling better than ever,” says Dr. Shekhman.

Clear the floor: It’s time for a dance-off.