“Muscle memory” is a real thing.

While it might feel like you haven’t been to the gym in forever, your muscles remember. Cue Celine Dion’s “My Heart Will Go On.”

According to a new study , muscles that have been trained in the past, back when the gyms were still open, establish a molecular memory. These molecular memories hang on, even during a prolonged period of inactivity. This means that when we finally return to our regular workout routines, the memories our muscles have could help us get back to where we were quicker. The gains shall not be entirely lost!

The study was composed of 19 women and men who were described as “training naive,” meaning they had never played a sport or followed a rigorous lifting routine before. This ensured that their muscles were unfamiliar with weight training—no pesky memories hanging around to interfere with the results.

The participants completed 10 weeks of training, but here’s the catch—they were only allowed to work out one of their legs. The other leg stayed still and served as the control group for the experiment. Researchers had them complete leg presses and leg extensions, increasing the weight as they got stronger. At the end of the ten-week-program, they measured the participants’ muscles and then stopped their training all together.

The prolonged period of inactivity lasted for 20 weeks, approximately five months. After the time off, researchers conducted muscle biopsies on both legs. They also had participants complete a rigorous workout, using both legs this time. Sure enough, the stronger leg, the one that had completed the ten-week-program, retained approximately half of the strength gained before the 20 week break.

This study is unique, because while we might already be familiar with muscle memory in terms of motor skills (“it’s like riding a bike”), less is known about how the muscles maintain strength over time.

Five months is a long time to go without exercise. The fact that the participants’ muscles retained about half their strength, even during that long respite, is encouraging. This is especially good news for those of us fitness fanatics who already feel like it has been decades since the gyms closed and we were left to our own devices.

All is not lost. These findings indicate that muscle memory may occur at a cellular level. According to the researchers, “several key regulatory genes and proteins involved in muscular adaptations to resistance exercise are influenced by previous training history.” Basically, even if you’re stuck at home for a long while, all that hard work you did still counts. When you return to the gym, your muscles will remember.