Inspiring, coaching, critiquing, training, promoting, problem-solving. There is no shortage of work to be done by good managers.

Weed is still illegal in the US under federal law, but that hasn’t stopped nine states from legalizing its recreational use, and 29 states from allowing its medical use. Now that legal access to pot is so widespread, companies are confronting it, with some difficulty, in their hiring and employment policies.

In an annual survey by HireRight, a background-screening company, 67% of employers said they had policies addressing medical use of marijuana. Six years ago, only 21% of employers said they had such a policy or planned to create one.

Meanwhile, 22% of companies polled by HireRight, which surveyed roughly 6,000 HR officers, recruiters, and managers, cited medical marijuana use as one of their biggest compliance challenges. That’s in part because the law regarding usage varies so much across the country, and also because drug use in a professional setting remains controversial topic, even if drug use itself has become more socially acceptable.

Take note, however: The sheer existence of a medical marijuana policy at a company is nowhere near a free pass to get high at work—these policies often restrict rather than accommodate. And employees can still be fired for using medical marijuana at work, even when it’s legal.