Oklahoma Cannabis Reconciliation Services
METRC and Seed-to-Sale Reconciliation for Oklahoma Cannabis Businesses
Operational inventory data, point-of-sale activity, purchasing records and the accounting books do not always agree. Reconciliation identifies the differences between seed-to-sale records and the financial system, explains why they exist, and determines how they should be reflected so inventory, cost of goods sold and financial reporting rest on consistent records.
- Systems
- Seed-to-sale, POS, GL
- Inventory
- Quantities and value
- COGS
- Supportable schedules
- Cleanup
- Historical periods

METRC Reconciliation for Oklahoma Cannabis Businesses
A licensed cannabis business runs on several record systems at once, and each of them is telling a version of the same story. Reconciliation is the accounting work of comparing those versions and resolving the differences. Depending on the operation, the records involved may include:
- METRC or the applicable seed-to-sale tracking data
- Accounting software and the general ledger
- Inventory records and subledgers
- Point-of-sale reports
- Purchasing records and open purchase orders
- Vendor invoices and accounts payable
- Production and batch records
- Inbound and outbound transfer records
- Physical inventory counts
- Cost of goods sold schedules
The objective is not to make two totals appear equal. Forcing agreement with a plug entry hides the underlying problem and guarantees it returns next period. The objective is to understand why a discrepancy exists, whether it represents a data error, a process gap, a timing difference or a real inventory loss, and then determine how it should be recorded in the financial records with documentation behind it.
What Is Seed-to-Sale Reconciliation?
Seed-to-sale reconciliation compares operational and compliance inventory data with the business and financial records to identify inconsistencies. It looks at quantities on hand, movements during the period, adjustments and conversions, and asks whether the accounting records describe the same activity in the same periods.
That is the accounting definition. Readers looking for broader background on what seed-to-sale tracking is, how the systems work and what they are used for will find that in our METRC guide, which is the informational companion to this service page.
METRC Is Not Your Accounting System
A recurring source of trouble is treating the compliance system as if it were the books. It records real and important information, but it was never designed to produce financial statements, and it does not carry the information a financial statement needs.
Operational and compliance tracking
- Inventory quantities on hand
- Plants, batches and packages where applicable
- Inbound and outbound transfers
- Inventory adjustments
- Waste and destruction events
- Production and conversion activity
Accounting system
- Inventory value, not just quantity
- Purchases and vendor liabilities
- Cash and bank activity
- Cost of goods sold and gross profit
- Revenue and operating expenses
- Assets, liabilities and equity
The systems overlap because they observe the same business activity, but they answer different questions. Reconciliation is the bridge between them, not a replacement for either one.
METRC-to-General-Ledger Reconciliation
Comparing operational inventory information against the financial inventory accounts follows the same roll-forward logic used for any inventory balance. Each component is tested against a source rather than accepted because the total looks reasonable.
- 01Agree beginning inventory to the prior period's closed balance
- 02Test purchases against vendor invoices, receiving and accounts payable
- 03Test production additions against production and conversion records
- 04Trace inbound and outbound transfers through both systems
- 05Review adjustments, waste and write-offs for documentation
- 06Agree ending inventory quantities to seed-to-sale and count data
- 07Recompute cost of goods sold and compare it to the posted balance
Quantity-level accuracy does not automatically produce a financially accurate inventory balance. The compliance system may show exactly the right number of units while the ledger carries them at the wrong cost, in the wrong period, or in the wrong account. Both the count and the cost have to be right for the balance sheet to be right.
Seed-to-Sale and Inventory Accounting Reconciliation
Reconciliation and inventory costing are related but separate disciplines. Together they determine whether an inventory balance can be supported.
- Inventory quantities confirmed against operational and count records
- Inventory valuation applied through a documented costing method
- Product costs traced to invoices, freight and applicable landed costs
- Production costs assigned to work in process and finished goods
- Cost of goods sold derived from the roll-forward rather than plugged
- Adjustments recorded with an explanation and supporting evidence
- Physical counts used to test the perpetual records
- General ledger balances tied to the subledger detail
- Period-end balances that can be reproduced later from the workpapers
Reconciliation supports inventory accounting; it does not replace a complete inventory costing methodology. Costing policy, standard costs, variance review and valuation are covered on the inventory and cost accounting page.
Dispensary Reconciliation
Retail is where discrepancies surface fastest, because a dispensary posts hundreds of transactions a day across at least three systems. Each system can be internally consistent and the three can still disagree, which is what makes dispensary reconciliation a recurring discipline rather than a one-time fix.
- Seed-to-sale records for packages, sales and adjustments
- POS reports for sales, discounts, voids and refunds
- Purchasing records and open orders with vendors
- Vendor invoices and the amounts actually payable
- Receiving activity and the date inventory was accepted
- Transfers in from other locations or affiliated entities
- Customer returns and how they re-enter inventory
- Inventory adjustments and documented waste
- Physical inventory counts and cycle counts
- Sales and revenue as recorded in the accounting system
Differences occur even when each system appears correct because the systems record events at different moments and through different processes. A package received on the last day of the month, a refund processed in POS but not reversed in tracking, or a product mapped to the wrong catalog item all produce a difference no single system can detect on its own. Broader retail accounting is covered on the dispensary accounting page.
Dispensary Inventory That Finally Ties Out
If your POS, tracking system and books disagree and no one can say why, a consultation is the fastest way to scope the investigation and get inventory back on solid ground.
POS, Seed-to-Sale and Accounting Reconciliation
Most cannabis operators face a three-system problem: transaction records in the POS, operational records in the seed-to-sale system, and financial records in accounting. Every pair of systems can drift, and the drift compounds when it goes unexamined.
Timing
Events recorded on different dates across systems, especially around end-of-day close, month-end cutoff and receiving.
Data entry
Manual entry in one system that never happens in another, or happens differently by shift and by person.
Integrations
Automated links that fail quietly, retry, or push duplicates. An integration should be verified, not assumed.
Adjustments
Corrections made where they are convenient rather than where they belong, leaving the other systems untouched.
Returns and voids
Reversals handled fully in one system and partially in another, leaving quantities or revenue out of step.
Transfers
Movement between locations or stages completed on one side and left open on the other.
Product mapping
Catalog items that do not correspond one-to-one across systems, so totals agree in dollars but not by product.
Manual journal entries
Entries posted directly to inventory or COGS that bypass the subledger and break the roll-forward.
Cannabis Sales Reconciliation
Sales reconciliation confirms that revenue recorded in the books matches what the store actually sold and what the bank actually received. It runs parallel to inventory reconciliation and often explains differences the inventory work surfaces.
- POS daily and period reports compared to recorded revenue
- Bank deposits and cash records traced to the sales they represent
- Seed-to-sale sales activity compared where the data is relevant
- Taxes collected recorded as a liability rather than revenue where applicable
- Timing differences between sale date, deposit date and posting date
- Refunds and their effect on both revenue and inventory
- Discounts and promotional pricing recorded consistently
- Voided transactions that should not reduce inventory
- Cash overages and shortages identified rather than absorbed
- Payment settlement timing for electronic methods in use
- Journal entries that summarize daily activity into the ledger
Cannabis Purchase and Receiving Reconciliation
Purchasing is the most common source of inventory differences we find, because receiving is a physical event that has to be recorded in several places by people who are busy doing something else.
- Vendor invoices matched to what was ordered and what arrived
- Purchase records reconciled to receiving documentation
- Receiving dates that determine which period the inventory belongs to
- Inventory additions posted at the correct cost, including applicable charges
- Accounts payable balances that agree with vendor statements
- Cash payments applied against the correct invoices
- Seed-to-sale receipt of transferred packages
- Accounting inventory reflecting the same receipt in the same period
Incomplete or mistimed receiving creates a difference in both directions: inventory that physically exists but is not on the books, or an invoice recorded without the corresponding inventory. Either one distorts the period's cost of goods sold until it is found.
Cannabis Transfer Reconciliation
Transfers move inventory without a sale, which means they change where value sits without changing how much of it exists. That makes them easy to record on one side and forget on the other.
- Transfers between licensed locations of the same operator
- Movement between departments within a facility
- Movement between production stages as material changes form
- Transfers between affiliated entities where applicable
- Open transfers that were initiated but never received
- Quantity differences between what was sent and what was accepted
- Location-level inventory balances after the transfer posts
- Accounting entries that move cost along with the units
Operational transfer procedures are governed by the applicable tracking system and regulatory requirements; those specifics belong in the METRC guide. The accounting question here is whether the financial records follow the same movement in the same period.
Cannabis Inventory Adjustments and Discrepancies
When two systems disagree, the cause is almost always on this list. Working through it methodically is faster than searching transaction by transaction.
- Receiving errors in quantity, cost or date
- Timing differences around period cutoff
- Unit-of-measure problems between grams, units and cases
- Transfers completed on one side only
- Customer or vendor returns handled inconsistently
- Waste and destruction recorded operationally but not financially
- Damaged inventory written off without documentation
- Shrinkage that has never been quantified
- Production conversions that change form and cost basis
- Manual adjustments made without an explanation
- POS product mapping that does not match the tracking catalog
- Accounting posting errors to the wrong account or period
- Integration failures that skipped a batch of transactions
- Duplicate transactions from a retried sync
- Missing transactions that never reached the ledger at all
Physical Inventory vs. Seed-to-Sale Records
Physical counts are the only independent test of whether the perpetual records reflect what is actually on the shelf. Everything else compares one system's data to another system's data.
- Documented count procedures applied the same way each time
- A clear cutoff so movement during the count is handled correctly
- Count differences quantified by product rather than in total
- Waste and destruction events reviewed against the count variance
- Shrinkage identified and tracked over time as a trend
- Damaged product accounted for separately from unexplained loss
- Unrecorded transfers identified as a cause of apparent shortages
- Receiving timing reviewed for inventory counted but not yet booked
- Adjustments posted only after the difference has been explained
Unexplained physical differences should be investigated rather than forced into agreement. A recurring variance in the same product or the same location is usually telling you something about a process, and that information is lost the moment it is adjusted away.
METRC Reconciliation and Cannabis COGS
Cost of goods sold is a derived figure, which means it inherits every error in the inputs. When inventory records are unreliable, the effects show up across the income statement rather than in one place.
- Beginning inventory carrying forward last period's unresolved differences
- Purchases recorded in the wrong period or at the wrong cost
- Production costs assigned inconsistently between runs
- Ending inventory that cannot be traced to counts or tracking data
- Cost of goods sold absorbing whatever the other numbers leave behind
- Gross profit that swings between periods without an operating explanation
- Product-level margins that cannot be relied on for pricing decisions
Cost of goods sold in a production environment is not a single formula applied uniformly; it depends on the costing method, the stage of inventory and the business model. That methodology is addressed on the inventory and cost accounting page, and reconciliation is what makes the methodology trustworthy.
METRC Reconciliation and IRC Section 280E
Accurate inventory and cost of goods sold records matter when preparing financial statements and tax records for a cannabis business, because those records are the evidence behind whatever positions the return takes.
What reconciliation contributes is documentation: inventory balances that can be traced, movements that can be explained and schedules that hold up when someone asks where a number came from. Position analysis belongs with 280E tax compliance.
METRC Reconciliation for Cannabis Cultivators
Cultivation reconciliation follows a biological process rather than a purchase order. Inventory is created rather than bought, changes form as it moves through the cycle, and loses weight along the way for entirely legitimate reasons.
- Plant, batch and package activity where the tracking system records it
- Harvest events and the wet-to-dry weight relationship
- Waste and destruction recorded through the cycle
- Movement between production stages and rooms
- Work in process balances that reflect crops not yet harvested
- Finished inventory available for transfer or sale
- Physical counts of packaged and bulk material
- Cost records supporting what was accumulated into each batch
- Accounting inventory that mirrors operational stages
Room-level costing and cultivation accounting practice are covered on the cultivation accounting page.
Seed-to-Sale Reconciliation for Cannabis Manufacturers and Processors
Manufacturing reconciliation is the most technically demanding version of this work, because inventory is transformed. A quantity of input does not correspond to a quantity of output in any fixed ratio, so a simple in-versus-out comparison never reconciles cleanly.
- Raw material received and staged for production
- Production inputs consumed by each run
- Work in process held between stages
- Finished goods produced and packaged
- Conversions that change both unit of measure and cost basis
- Packaging materials consumed alongside product
- Production runs documented well enough to reconstruct later
- Waste and byproduct handled consistently in both systems
- Yield compared to expectation, with variances explained
- Transfers of bulk and finished goods between facilities
- Inventory costing applied consistently across stages
Process costing, bills of material and yield variance analysis are covered on the manufacturing accounting page.
Reconciliation for Vertically Integrated Cannabis Businesses
A vertically integrated operator holds inventory in every stage at once. The same material may be a growing plant, a bulk input, a packaged product and a retail sale over the course of a few months, and the records have to follow it the whole way.
- Cultivation producing material for internal use rather than sale
- Processing and manufacturing consuming that material as an input
- Distribution activity where the operator moves product between sites
- Retail selling finished goods the same organization produced
- Multiple locations each holding a portion of the total inventory
- Consistent cost carried across stages rather than reset at each handoff
- Internal transfers documented as carefully as third-party ones
Consistency is the whole game here. When each stage keeps records its own way, the consolidated inventory balance becomes an estimate no one can defend.
Multi-Location Cannabis Inventory Reconciliation
Adding locations multiplies reconciliation work rather than adding to it, because every transfer creates a matched pair of entries that both have to be right.
- Location-level inventory balances maintained separately
- Inter-location transfers matched on both sides each period
- Central purchasing allocated to the locations that received the goods
- Store-level POS activity tied to store-level inventory
- Shared products mapped identically across every location
- Location dimensions carried into general ledger reporting
- Consolidated reporting that rolls up without manual adjustment
Unresolved discrepancies get harder to diagnose as the organization grows. A difference isolated to one store in one month is a manageable investigation; the same difference spread across four stores and eight months is a project.
Month-End Cannabis Reconciliation
Reconciliation belongs in the recurring close, not in the scramble before a tax deadline. Problems found within a month are traceable to specific transactions; problems found a year later often are not.
- 01Review sales activity across POS, tracking and the ledger
- 02Review purchases, receiving and vendor invoices for the period
- 03Review inbound and outbound transfers for open items
- 04Review inventory adjustments and confirm documentation
- 05Compare operational inventory records to the subledger
- 06Incorporate physical count or cycle count information
- 07Reconcile inventory accounts and agree the roll-forward
- 08Review cost of goods sold against expectations and history
- 09Investigate differences and identify their cause
- 10Document adjustments with support before posting
- 11Close the period and carry the balances forward
No single cadence is right for every operator. A high-volume multi-store retailer may need weekly review of some elements, while a smaller single-site business may reconcile fully at each month end. The requirement is that it happens on a schedule somebody owns.
Historical METRC and Inventory Cleanup
Many operators come to us with problems that have been accumulating for a while. These are the situations cleanup engagements address:
- Tracking and accounting records have not agreed for months
- Inventory on the balance sheet is obviously wrong but nobody can prove by how much
- Cost of goods sold moves unpredictably from period to period
- POS totals do not match recorded revenue or inventory relief
- Old inventory balances sit for products no longer carried
- Transfers are recorded inconsistently between locations
- Adjustments exist with no documentation behind them
- Prior bookkeeping never reconciled inventory at all
- A physical count exposed differences far larger than expected
Cleanup begins by identifying where and when the records first diverged. That means working backward to the last period that can be supported, then rebuilding forward with documented corrections rather than adjusting the current balance to whatever the count says today.
Historical Reconciliation Cleanup
Bring your tracking reports, POS reports, general ledger and any count data. We will identify where the records diverged and scope what it takes to rebuild them.
METRC Reconciliation and Cannabis Bookkeeping
Bookkeeping and reconciliation are different jobs performed on the same records. Bookkeeping records financial activity; reconciliation tests whether that record agrees with the operational reality it is supposed to describe.
- Purchases recorded, then tested against receiving and tracking data
- Sales recorded, then tested against POS and deposit activity
- Inventory posted, then tested against the subledger and counts
- Cost of goods sold derived, then tested through the roll-forward
- Cash and bank activity reconciled to statements
- Vendor bills entered, then agreed to statements and payments
- Journal entries reviewed rather than accepted at face value
- Month-end close that includes reconciliation as a required step
Ongoing close and categorization work is described on the cannabis bookkeeping page, and the reporting built on top of it on the financial reporting page.
METRC Reconciliation and Cannabis Tax Preparation
Year-round reconciliation changes what tax preparation looks like. Instead of reconstructing inventory in the spring from whatever records survived, the schedules already exist and were tested when the underlying events were still recent.
- Inventory schedules by stage and location, already agreed
- Cost of goods sold support that traces to source documents
- Purchase records matched to invoices and payments
- Adjustments documented at the time they were made
- Ending inventory tied to counts and tracking data
- Supporting workpapers retained and reproducible
Return preparation and the workpapers behind it are covered on the cannabis tax preparation page.
Common Seed-to-Sale Reconciliation Problems
If any of these describe your business, the underlying cause is usually identifiable within a defined review.
Symptoms operators describe
- Tracking quantities do not match POS
- POS does not match the accounting records
- Accounting inventory does not match the physical count
- Purchases appear in one system but not another
- Transfers remain open and unresolved
- Old adjustments accumulate with no explanation
- Negative inventory appears for active products
- COGS fluctuates without an operating cause
- Inventory valuation cannot be supported on request
- Production conversions create unexplained differences
- Locations disagree after every transfer
- Year-end inventory requires a major cleanup each time
What the investigation looks at
- Product mapping and unit-of-measure consistency
- Integration logs and posting gaps by date
- Cutoff around period end and end-of-day close
- Receiving documentation and invoice dates
- Open transfer reports on both sides
- Adjustment reports sorted by user and reason
- Sales relief that outpaces recorded receipts
- The inventory roll-forward, component by component
- Costing method applied against source invoices
- Production records and yield expectations
- Location coding in both the tracking system and the ledger
- The last period that reconciled cleanly
What We Review During a Reconciliation Engagement
Scope varies with the size of the business, the number of systems and the condition of the records. Not every item below is needed in every engagement, and the review is defined before work begins.
- Seed-to-sale reports covering the periods under review
- POS reports including sales, refunds, discounts and voids
- General ledger detail for the relevant accounts
- Inventory accounts and any supporting subledger
- Cost of goods sold accounts and how they are populated
- Vendor invoices for the purchases under review
- Purchasing and receiving records
- Production and batch reports where applicable
- Inbound and outbound transfer records
- Inventory adjustment reports with reasons and users
- Physical inventory count sheets and summaries
- Bank records supporting purchases and deposits
- Prior reconciliations and workpapers if any exist
- Financial statements for the periods involved
Oklahoma METRC and Seed-to-Sale Reconciliation
Oklahoma cannabis operators run compliance tracking and accounting side by side, and the two only stay aligned when somebody reconciles them deliberately. We work with businesses across the state, including operators in Oklahoma City, Tulsa, Norman, Broken Arrow, Edmond, Lawton and Durant, and with smaller markets served remotely. Reconciliation is report-driven work, so it is handled the same way regardless of where the facility sits.
Oklahoma dispensaries
POS, tracking and accounting reconciled for one location or several, with store-level inventory and consolidated reporting.
Oklahoma cultivators
Harvest, waste, stage transfers and work in process reconciled against cost records and financial inventory.
Oklahoma processors and manufacturers
Conversions, yields, packaging and finished goods reconciled where inventory changes form between systems.
Other Oklahoma operators
Transporters, distributors and vertically integrated businesses coordinating inventory records across entities.
Questions to Ask About Cannabis Inventory Reconciliation
These questions separate a genuine reconciliation engagement from a bookkeeper who adjusts inventory to whatever the count says.
- Which systems will actually be reconciled, and against what source?
- How do you investigate a discrepancy rather than adjust it away?
- How do you reconcile seed-to-sale data with the general ledger?
- How do you handle differences between POS and tracking records?
- How are inventory adjustments reviewed and documented?
- How does reconciliation affect cost of goods sold and margins?
- Can you help with historical cleanup, and how is that scoped?
- How frequently should our business reconcile, and why?
- How do you work alongside our existing bookkeeper or controller?
- What records will you need from us to start?
METRC and Seed-to-Sale Reconciliation FAQs
- What is METRC reconciliation?
- METRC reconciliation is an accounting process that compares seed-to-sale tracking data with the other records a cannabis business keeps: point-of-sale reports, purchasing and receiving records, production records, physical counts and the general ledger. The purpose is to identify where the records disagree, determine why, and decide how the difference should be reflected in the financial statements.
- What is seed-to-sale reconciliation?
- Seed-to-sale reconciliation is the same exercise described in system-neutral terms. It compares operational and compliance inventory data with business and financial records to surface inconsistencies in quantities, timing, valuation or classification. For background on how seed-to-sale tracking itself works, our METRC guide covers the informational side.
- Is METRC an accounting system?
- No. Seed-to-sale tracking systems record operational and compliance activity such as quantities, packages, transfers, adjustments and waste. Accounting systems record financial information such as inventory value, purchases, vendor liabilities, cash, cost of goods sold, revenue and equity. The two describe the same underlying business activity from different angles and should not be treated as interchangeable.
- Why doesn't METRC match my accounting records?
- Common causes include timing and cutoff differences, receiving recorded in one system before the other, unit-of-measure inconsistencies, transfers that were never completed on both sides, returns and waste handled differently, product mapping problems, manual journal entries that bypass the inventory subledger, duplicate or missing transactions, and integration failures. Most differences trace to a specific event on a specific date once the records are compared systematically.
- Why doesn't my POS match METRC?
- Point-of-sale and seed-to-sale systems record sales through separate pathways, and any integration between them can fail silently. Voids, refunds, discounts, manual price overrides, product mapping between catalogs, timing around end-of-day close and adjustments made in one system without the other all create differences. Investigating the pattern usually reveals whether the issue is a process problem or a one-time event.
- How does seed-to-sale reconciliation affect inventory accounting?
- Reconciliation tests whether the quantities behind the inventory balance are supportable. It does not by itself establish valuation. Inventory accounting requires a documented costing methodology that assigns cost to those quantities; reconciliation confirms the quantities and movements the methodology is applied to are accurate.
- How does reconciliation affect COGS?
- Cost of goods sold is driven by beginning inventory, purchases and production costs, and ending inventory. If ending inventory is wrong, cost of goods sold and gross profit are wrong by the same amount in the opposite direction. Reconciliation is how a business gains confidence that the inventory figures feeding that calculation reflect reality.
- How often should cannabis inventory be reconciled?
- There is no single correct cadence for every business. Many operators reconcile inventory as part of the monthly close, with more frequent review of high-volume retail activity and periodic physical counts. The right frequency depends on volume, the number of locations, how many systems are involved and how quickly problems need to be caught.
- Can you help clean up historical discrepancies?
- Cleanup engagements start by identifying where and when the records first diverged, then work forward. That typically means reviewing seed-to-sale and POS reports against the ledger period by period, examining adjustments and transfers, evaluating physical count data and documenting corrections. Scope and outcome depend on what the records show once reviewed.
- Can you reconcile multiple dispensary locations?
- Yes. Multi-location work adds location-level inventory tracking, inter-location transfers, central purchasing allocation and consolidated reporting to the process. Consistent procedures across sites matter more than any single reconciliation, because inconsistent coding is what makes multi-location discrepancies hard to diagnose later.
- Do cultivators and manufacturers need reconciliation?
- Production businesses often need it more than retail, because inventory changes form. Plants become harvested material, material becomes bulk product, bulk becomes packaged goods, and each conversion is a point where operational records and financial inventory can drift apart.
- What records are needed for a reconciliation review?
- Typically seed-to-sale reports, POS reports, general ledger detail for inventory and COGS accounts, purchasing records and vendor invoices, production and transfer reports, adjustment reports, physical inventory counts, bank records and any prior reconciliations. Scope varies by business, and not every item is needed in every engagement.
Related Services
Inventory & Cost Accounting
Valuation methodology and COGS work that reconciliation supports.
Read moreCannabis Bookkeeping
Monthly close and categorization that reconciliation tests.
Read moreDispensary Accounting
Retail accounting across POS, cash handling and inventory.
Read moreCultivation Accounting
Room-level costing and production accounting for cultivators.
Read moreManufacturing Accounting
Process costing, conversions and yield analysis for processors.
Read more280E Tax Compliance
Tax position analysis that depends on supportable inventory records.
Read moreCannabis Tax Preparation
Return preparation built on reconciled inventory schedules.
Read moreFinancial Reporting
Management reporting that reconciled inventory data makes reliable.
Read moreGuides and Reference
Get Help Reconciling Your Oklahoma Cannabis Records
If your tracking system and accounting records disagree, your POS totals do not match the books, inventory on the balance sheet cannot be supported, adjustments have piled up without explanation, cost of goods sold moves unpredictably, or month-end inventory has become the hardest part of the close, call to talk it through or schedule a consultation to review your records and define scope.