Being a parent is a tough enough job as it is. But when you throw work into the mix — and have to deal with both your kids and a hard deadline all at once — things can become downright chaotic. Approximately 61.9% of married-couple families with children have to juggle both professional aspirations and parental obligations all at once. Working from home often seems like the perfect solution, but many people find it’s even harder to strike a balance when you’re always available to your little ones and to your boss. So how can you make working from home work for you?

According to the 2010 U.S. Census Bureau, over 13 million Americans worked from home at least once per week. By 2017, at least 23% of all American workers did at least some of their work from home on the average day. It’s a scenario that’s become more appealing to both workers and employers, as it can save time and money to allow employees to work remotely. And while 19.8% of business time is often wasted by employees searching for the information required to effectively do their jobs, some reports show that working from home can result in greater productivity. In fact, a two-year study found that the increased productivity exhibited by telecommuters equated to a full day’s worth of work. Employees who work from home also take fewer sick days, time off, and shorter breaks, while having a positive environmental impact and saving employers thousands of dollars on rental space.

Of course, all that productivity can go right out the window when you’re constantly tending to your children instead of getting your work done. That’s why you’ll need to have a plan of attack if you’re a work-from-home mom (or dad). By keeping the following tips in mind, you’ll likely still be considered the Best Mom Ever and Employee of the Month.

Establish Boundaries

Setting boundaries can be hard for many people, especially when you’re a parent. If you don’t put your child’s needs ahead of your own, is it possible to still be a good mother? The answer is yes, because caring for yourself is the only way you can properly attend to others’ needs. That applies to areas like self-care just as well as it does to your professional responsibilities.

Although setting emotional boundaries is important, sometimes physical boundaries are actually better when dealing with your children. That might mean establishing a separate office space for yourself in your home (one that can actually be closed off with doors), rather than relying on a common area to get work done. Although the construction industry eliminated more than 40% of its workforce between 2006 and 2011, you might not need to hire a contractor for this. You might be able to transform a guest room or another area into your new office with ease. (You might also be able to write it off on your taxes!) Having a door that can be shut allows you to put a sign up to remind your children that you’re in an important meeting. Even if you aren’t able to close a door, sitting at a desk in your office can help to enforce new behaviors (e.g., “when mommy is sitting at her desk, she is busy with work”). Having this kind of healthy barrier can be a great thing for both you and your kids.

Adopt Flexible Hours

If you have to stick to strict eight-hour days, it can be tough to tend to everyone’s needs. But if your employer will allow for more flexible hours, you can switch your schedule around to make life easier for everyone. For example, you can fit in a few hours of work before your kids wake up or after they’ve gone to sleep. That way, you can be present during the times they need you most during the day without worrying about how you’ll have to play catch-up the next day. Waking up earlier might not be your favorite option, but it can allow you to be a lot more productive — and spend quality time with your kids a bit later in the day. Plus, that will give you the opportunity to wear them out a bit and increase the chances of an afternoon nap (during which time you can squeeze more work in). Ultimately, you’ll want to have at least a loose schedule so that you can keep track of your hours and ensure you’re able to communicate with team members. But given the nature of parenting, having some flexibility will be key.

Consider Extra Help

For some families, it may not always be possible to work from home and have the kids around all the time. If your kids are young or you’re working on a project that requires your undivided attention, you may want to consider enlisting some extra help. You might want to explore options for in-home childcare or daycare programs, for instance. You might also consider asking another mom friend to have a play date at their house for a few hours or asking your parents and in-laws to babysit at least one day a week. If you have a conference call or Skype meeting, making this type of arrangement can also be beneficial. There’s no shame in realizing that you can’t do it all at once. And ultimately, everyone will be better off if you’re able to recognize that. Learning how to ask for help is a real skill, but you won’t get better at it unless you make the effort.

Finally, if you use the internet and a computer to work from home, remember that the world wide web is about so much more than punching the clock. While the internet can connect you to work and new job opportunities, it can also help you break the sense of isolation you may feel as a work-from-home parent. As of 2016, there were an incredible 3.5 billion internet users. It’s never been easier to find a community of friends in the digital world. Whether you’re looking for fellow stay-at-home moms, animal lovers, or rock-climbing single parents, you can find your people online.

When you’re a parent, working full-time (or even part-time) can feel like a huge sacrifice. But it’s a reality that most families do face. The trick is to be strategic and to go in with a game plan. That way, you’ll be able to be a more effective parent and a more effective employee — and you won’t feel like you’re losing your mind in the process.