Losing weight is one thing, but—for many people—keeping it off long-term is the true battle. Thankfully, researchers at California Polytechnic State University have pinpointed some of the most important elements of the weight loss maintenance equation.

The scientists surveyed 4,786 people who were able to maintain a weight loss greater than 9.1 kilograms (about 20 pounds) for more than 3 years. Responses indicated that building healthy dietary, self-monitoring and psychological coping strategies were key to siphoning off weight and keeping it at bay.

This could mean implementing certain behavioral and mental tactics, such as setting a goal to include more vegetables at lunch; tracking what you eat daily with a food diary; and making a habit of using more positive self-talk, even when faced with setbacks like small amounts of weight regain.

The survey also showed that these eating and thinking behaviors became less onerous to follow and more automatic over time, making it easier to defy the odds of keeping the pounds off.