Bio-Tech Medical Software Inc. has two state contracts, it operates in 18 states and outside the U.S., and it recently closed a $5 million series A round of funding.

But the company struggles with an issue facing any business operating in the marijuana industry today, even though it isn’t directly dealing with the plants.

“One of our greatest desires is to be seen as legitimate,” said Patrick Vo, co-CEO of the company. “To not be seen as barely legalized drug dealers, but to be seen as legitimate business people.”

Bio-Tech Medical Software makes a seed-to-sale marijuana tracking system called BioTrackTHC, that tracks plants as well, as sales, buying trends and employee handling of the products. The system is used by medical and recreational dispensaries, growers and state governments. It initially tags and numbers marijuana plants and then as each part is used—from stem to leaves to waste—it takes on its own related serial number.

“Every single fraction of a gram of the cannabis plant needs to be tracked,” said Vo.

The seed-to-sale tracking system. BioTrackTHC

The company was started by founder and co-CEO Steven Siegel as a tracking system for prescription drugs.

In 2007, Siegel was running a chain of medical centers in Fort Lauderdale, Fla. and saw out-of-state patients coming in to ask for prescriptions for OxyContin and other pain killers. To stop customers trying to game the system, Siegel developed a biometric anonymous tracking system—identifying patients though human body characteristics such as fingerprints or DNA—to be used in doctor’s offices and pharmacies.

Siegel lobbied state governments in Florida and Colorado to adopt the system statewide, but without success. The lobbying effort cost $200,000 to $300,000 a state, he said.

To raise more money and respond to demand from dispensaries, Siegel pivoted to use the system for marijuana tracking instead. But it took two years for the startup to get funding, and it ran into difficulties getting workers’ compensation insurance—and hiring qualified employees.

“Everyone’s under the impression that the quantity of weed you smoked as a teenager is a qualification for working here,” said Vo.

See also: What it’s like inside a recreational marijuana dispensary

There are also challenges in working with dispensaries, which can be late in their payments because they have trouble opening a bank account and keep all their money in cash, said Siegel.

That’s because marijuana is still an illegal substance under federal law, classed as a schedule 1 drug, which puts it on a par with heroin and LSD, and discourages banks from engaging with businesses. At state level, regulations vary, but 23 states and Washington, D.C. have legalized medical marijuana and/or recreational marijuana or cut down on associated penalties.

That has created a sizable business opportunity. There are an estimated 5,169 U.S. medical and recreational marijuana stores today, which are predicted to bring in $4 billion in revenue in 2015, according to IBISWorld. There are another 100,742 growers, which are expected to generate $2 billion in revenue.

See also: The marijuana industry’s accidental entpreneurs

Bio-Tech Medical Software now boasts 1,113 dispensaries and growers as customers, and offers compliance tools which can automatically send data to state governments that require it.

The company has state contracts with Washington and New Mexico, meaning that those states use a modified version of the system to collect data from dispensaries.

Depending on the state and the size of the facility, businesses pay $1000 to $1500 to set up BioTrackTHC and then pay a monthly fee of $200 to $500.

The company currently has just a handful of competitors as there aren’t many marijuana-tracking systems, said Jordan Wellington, an associate at Vincente Sederberg, a Denver-based marijuana law firm.

One reason is cost—it is expensive to pay for the research and investment needed to develop the systems, he said. Because each state has different compliance rules, Vo said the company has to issue different iterations of the software to its customers.

Other players in the tracking space are Franwell Inc.’s metric marijuana tracking system and MJ Freeway, Wellington said.

An employee inside Seattle Medical Marijuana Association Daron Stetner

Karl Keich, owner of Seattle Medical Marijuana Association, a not-for-profit co-op, said there were four systems that he considered. The Association does custom orders and Keich uses the system to see trends in what customers are buying, and to stay ahead of state compliance rules.

“I’m concerned about product loss,” Keich said. “I’m concerned about my margins on my sales.”

The association has been in business for five years and had $1.76 million in sales last year, he said.

Siegel, who wasn't a marijuana advocate but is now firmly in the legalized marijuana camp, said he feels his business is in a unique position to bridge both sides of the marijuana debate.

“Tracking is important no matter what,” Siegel said.

The executive plans to eventually return to the prescription drug tracking system to run alongside the marijuana business. But on the marijuana front, he said he expects more traceability systems and greater legalization across the country.

“Marijuana’s here,” Siegel said. “It’s in your backyard.”

Also read: 8 companies getting a contact high from the marijuana business