Shape cover star Sofia Vergara, also the star of ABC’s Modern Family, revealed in the magazine’s November issue that she recently started to exercise a fitness routine (pun intended). When turning 40 seemed to shine a light on the parts of her body that had gotten “soft,” she decided to hit the gym.

Vergara’s decision was due in small part to her run-loving co-star Julie Bowen, but more so because of cake and candy. "I heard about someone in L.A. who got hypnotized so they wouldn't eat candy," she told Shape. "I'm seriously looking into that because I'm obsessed." So far, Vergara has only looked into Pilates.

Vergara’s personal trainer, Jennifer Yates, works with the actress on a Pilates machine in an effort to be kind to her bad knees. In fact, one of the reasons Pilates machines and exercises appeal to so many people is for its adaptability. Some experts even say Pilates greatly improves posture, as well as helps a person to gain strength and flexibility.

Vergara admitted to Shape she doesn’t love the machine — but she doesn’t not love how her body has been changing. Oh, and she still loves cake. "When I do indulge, I exercise a bit harder the next day," she said. "My workout motto is really simple: no pain, no cake!"

Her motto is in line with the 80/20 rule that’s practiced for sustainable weight loss. It’s not exactly a diet, but it’s the idea a person eats healthy, clean foods 80 percent of the time, while indulging in, say, a cocktail or cookie, 20 percent of the time. Jessica Alba and Miranda Kerr are two examples of other celebrities that have used this principle to help them improve their relationship with food.

Biggest Loser trainer Jillian Michaels also advocates for being an 80/20 eater. She told Health that anything otherwise will leave a person feeling deprived. Additionally, it curbs temptation. When you don’t restrict indulgence, you’re less likely to nose-dive into that dessert-filled table set up for the office pot luck.

Moving away from the simple 80/20 rule is food columnist and author Mark Bittman's VB6 rule: Maintain a vegan diet before 6 p.m. After that, it's steaks on steaks on steaks. Well, really, it's better quality meat and non-vegan dishes, if so desired. The point is, sustainable weight loss can (we'd even argue should) include indulgence.

So yeah, excuse us while we steal this motto.