The average human has an eight-second attention span–less than that of a goldfish, according to a 2018 study from Microsoft. That number has shrunk over the years due to our digital connectedness and the fact that the brain is always seeking out what’s new and what’s next.

“No matter what environment humans are in, survival depends on being able to focus on what’s important–generally what’s moving. That skill hasn’t changed, it’s just moved online,” writes Alyson Gausby, consumer insights lead for Microsoft Canada.

So what do you do when you need to focus on work–and not what’s moving around you? For most people, the first and most important step to increasing focus is to change the way you view it, says Elie Venezky, author of Hack Your Brain.

“Focus is a muscle, and you can build it,” he says. “Too many people labor under the idea that they’re just not focused, and this becomes a self-fulfilling prophesy. Once you drop this mistaken belief, you can take a much more realistic approach to building focus.”

With a combination of mindset and tools, it’s possible to set up an environment that fosters focus. Here are eight tricks and tips for eliminating distractions and paying attention to what you need to do:

1. PREPARE YOUR BRAIN Before a task, calm your brain, says Venezky. “Take a minute or two to sit in a comfortable position and breathe deeply into your stomach,” he says. “You don’t have to sit cross-legged or chant. Let your body calm down before you approach your work. You’ll find it really helps you concentrate.”

2. UNDERSTAND WHERE YOUR FOCUS NEEDS TO BE Focus also involves an understanding of what is worthy of your distraction, says Ron Webb, an executive director at the American Productivity and Quality Center, a nonprofit research organization. “Success comes down to embedding that focus into the flow of how you work,” he says.

Webb suggests taking time to identify what deserves your focus for the year, for the month, for the week, and for the day. Then look at your calendar and block time dedicated to focus.

Focus also involves an understanding of what is worthy of your distraction.

“This keeps folks from being able to send calendar invites that are last-minute, nonemergency issues,” he says. “These are focus killers.”

3. UNPLUG FOR 30 MINUTES If you need to focus, log out of email and social media. “Even if you live and die by email, do yourself a favor and log out for 30 minutes either in the beginning of the day or for a period in the afternoon,” says Jan Bruce, co-author of meQuilibrium: 14 Days to Cooler, Calmer, and Happier. “You won’t believe how much you can get done when you’re not always interrupting yourself to return emails.”

4. GRAB SOME COFFEE That morning coffee doesn’t just help you wake up; it helps you focus on the day. If you need an attention booster in the afternoon, a coffeeshop run might do the trick. In a study published in the Journal of Alzheimer’s Disease, French physiologist Astrid Nehlig identifies a connection between caffeine and cognition. While caffeine doesn’t improve learning or memory performance, Nehlig found it does increase physiological arousal, which makes you less apt to be distracted and better able to pay attention during a demanding task.

5. CHECK THE THERMOSTAT If it’s too hot or too cool in your work environment, it could impact your focus. A study from Cornell University found that workers are most productive and make fewer errors in an environment that is somewhere between 68 and 77 degrees. Another study from the Helsinki University of Technology in Finland says the magic temperature is 71 degrees. If you don’t control the thermostat, you can opt to bring a sweater or a fan.

6. TURN ON SOME MUSIC Too much background noise can be very distracting, but according to a study from the Wake Forest School of Medicine and the University of North Carolina published in Scientific Reports, having music playing helps you focus on your own thoughts. The catch? You had to like the song.

“Given that musical preferences are uniquely individualized phenomena and that music can vary in acoustic complexity and the presence or absence of lyrics, the consistency of our results was unexpected,” the researchers wrote.

Whether it’s Beethoven, the Beatles, or the Beastie Boys, turn it up and get to work.

7. TAKE SHORT BREAKS Instead of succumbing to distraction, build it in, suggests a study from the University of Illinois. Psychologist Alejandro Lleras found that participants who were given short breaks during a 50-minute task performed better than those who worked straight through.

The study examines a phenomenon called “vigilance decrement,” or losing focus over time. Taking a short break in the middle of a long task reenergizes the brain.

“We propose that deactivating and reactivating your goals allows you to stay focused,” writes Lleras. “Our research suggests that, when faced with long tasks, it is best to impose brief breaks on yourself. Brief mental breaks will actually help you stay focused on your task.”

8. DOODLE If you’re sitting in on a long meeting or conference, improve your focus–and your artistic skills–by doodling. According to a study from the University of Plymouth in England, doodling aids in cognitive performance and recollection.

“Doodling simply helps to stabilize arousal at an optimal level, keeping people awake or reducing the high levels of autonomic arousal often associated with boredom,” writes lead researcher Jackie Andrade.