Frame your goals positively.

How you describe your goal makes a big difference. Focusing on what you want to bring into your life — not what you want to avoid — will make you more likely to actually pursue it. “That’s basically just brain chemistry,” says McGonigal. “Any sort of avoidance is going to trigger inhibition systems, whereas positive goals are going to trigger approach and reward motivation.”

Think about what you want to foster in yourself or what you want to do more often. That positivity can help motivate you when you find yourself slipping. “Saying ‘I don’t want to be fat anymore’ gives you no positive motivation to draw on when you just ate the second box of donuts,” says McGonigal. Be nice to yourself. It works.

Prepare for failure (in a good way).

Moments of failure are inevitable, but most of us abandon the goal entirely when minor failures and setbacks start piling up. We give up on getting fit when we miss the gym, or we forget about losing weight after a night of burgers and milkshakes. “In that moment when you fail, often the first instinct is to push the goal away,” says McGonigal. “It’s so uncomfortable to be in that place of self-doubt or self-criticism and guilt.”

Your task is not to avoid failures, but to plan for them. Ask yourself, how am I likely to fail? For example, if you’re likely to choose unhealthy meals when you’re hungry, carry a light snack that can tide you over. Psychologists call this an if/then contingency plan, or “if this happens, then I’ll do that.” It’s a mental plan for how you’ll react to things that might trip you up.

When detours and roadblocks come up, remind yourself why your goal matters to you. Those simple reminders about why it’s important can buoy your motivation and keep you headed in the right direction.