What Can I Write Off As A Deduction? The Complete List Of Small Business Tax Deductions
According to a study done by QuickBooks, one in 10 businesses don’t take advantage of tax deductions! Are you getting the most out of your potential tax deductions for 2020, or are you letting easy money pass you by?
We get it. With all of the recent changes to the tax code, the whole concept of business tax deductions can be daunting and confusing. But you work hard to make your small business profitable and successful — and we want you to be able to keep your business that way. That’s why we’ve compiled this comprehensive list of small business tax deductions to use for your 2020 taxes.
Learn about these key deductions, so you can stop asking how much you owe and start asking how much you’ve saved.
Table of Contents
- What Is A Business Deduction?
- The Top 30 Small Business Tax Write-Offs For Small Business Expenses
- What If I Missed A Business Tax Deduction?
- What Do PPP Loans & EIDL Advances Mean For Tax Deductions?
- What Do New Tax Laws Mean For Small Businesses?
- Start Saving On Your Tax Return
- Small Business Tax Deduction FAQs
What Is A Business Deduction?
The one thing that hasn’t change is the nature of deductions. A tax deduction is a business expense you can use to reduce your total taxable income. According to the IRS, expenses that qualify for deduction must be “both ordinary and necessary.”
The IRS further explains:
An ordinary expense is one that is common and accepted in your trade or business. A necessary expense is one that is helpful and appropriate for your trade or business. An expense does not have to be indispensable to be considered necessary.
So what does this mean for you? Essentially, you can save a lot more money than you might think.
The Top 30 Small Business Tax Write-Offs For Small Business Expenses
Many business owners know that you can deduct travel, meals, and employee wages, but that’s only the beginning.
We’ve compiled a list of 30 different tax deductions that your business may be eligible for.
Before reading anything further, note that not every business will be eligible for every type of deduction. To learn if you’re eligible for a deduction, double-check IRS regulations and always consult with your accountant.
Here is a list of some of the most common tax deductions available for small businesses:
- 20% pass-through credit
- Mileage
- Car & truck expenses
- Travel
- Meals
- Home office
- Office supplies & furniture
- Cost of goods sold
- Tools & equipment
- Repairs & maintenance costs
- Rent
- Moving expenses
- Utilities
- Internet services
- Software
- Employee benefits & bonuses
- Employee wages
- Commissions
- Employee education
- Insurance premiums
- Taxes
- Legal fees
- Bank & credit card fees
- Interest costs
- Startup costs
- Advertising & marketing expenses
- Research & experiment costs
- Cleaning & janitorial expenses
- Intangibles
- Charitable donations
Qualified Business Income Deduction
Because of the Tax Cuts & Jobs Act passed in 2017 by the President and Congress, certain business types may be eligible for a 20% pass-through deduction on their total taxable income.
So, what is a pass-through business?
For business types like sole proprietors, S corporations, and partnerships, the business’s income does not get taxed at the corporate level and instead passes through and is taxed at the individual level via the business owners’ tax return. Since the business owner is then responsible for paying the business’s taxes on their individual taxes, they can now take 20% off of their taxable income.
Mileage
Business owners and self-employed individuals can qualify for a mileage deduction. If you drive your car for a business purpose — such as meeting a client, picking up office supplies, driving to the bank for business transactions, etc. — you can write these miles off as a deductible business expense.
To calculate the mileage deduction, keep a careful record of the miles you drive, including the start and end odometer reading, and use the standard mileage rate to calculate your total deduction. 2020’s standard mileage deduction rate is 57.5 cents per mile.
With this deduction, you cannot claim your commute or any extra, personal errands you take when making your business errands.
It’s also important to note that you can choose either the mileage deduction or the vehicle expenses deductions — you can’t choose both, so it’s important to think about whether you would receive a higher tax return tracking your mileage or writing of your vehicle expenses.
Car & Truck Expenses
Car and truck expenses can be counted as a tax write off. These expenses include:
- Gas
- Oil changes
- Maintenance and repairs
- Tires
- Registration
- License
- Insurance
- Parking fees
- Garage rent
If you choose to deduct your vehicle expenses, you cannot deduct your business mileage — it has to be one or the other. Carefully consider how you use your vehicle to ensure you choose the right method to get the most money back. With either option, keeping good records is imperative.
Travel
In terms of travel, transportation between your home and a business destination can be deducted. Transportation via car, taxi, train, etc., is only covered if you are traveling from your lodging to a business-related destination. Additionally, lodging can count as a write-off as well as baggage, dry cleaning, and business calls. You can even count purchasing your passport as an expense if it’s for a business trip.
Keep good records of all this information to ensure you get the right deduction amount. Also, you can write off any travel arranged for job candidates being interviewed.
Meals
While you can longer deduct entertainment, you can still deduct meals if certain qualifications are met. According to the IRS, for meals to be a deductible business expense they must:
- Not be “lavish or extravagant”
- The meal is an “ordinary and necessary” business expense
- The taxpayer must be present when purchasing the food and/or drinks
- The meal is with a customer, employee, vendor, or other business contact
If all three of these requirements are met, you can deduct up to 50% of meal expenses. Because you can no longer deduct meals and entertainment collectively, make sure you pay for any meals separate from entertainment and keep strong records for your accountant.
Home Office
If you have a separate space in your home that is exclusively used for business, then you may be eligible for a home office deduction. This deduction is based on the size of the space and can be calculated in two different ways. The simplified method multiplies the square footage of your office by $5 for your total deduction. Or you can use the actual expense method, which allows you to deduct home office expenses such as:
- Furniture
- Paint
- Rent
- Property Taxes
- Utilities
- Repairs
While you can sometimes receive a larger deduction going with the actual expenses method, it does require much more work and careful bookkeeping.
Read our guide the Small Business Taxes: The Home Office Deduction Explained to learn if you qualify for this deduction.
Office Supplies & Furniture
Office supplies needed to run your business, such as paper, ink, postage, pens, staplers, toilet paper, break room supplies, etc., are 100% deductible. Although, if you plan on buying a large amount of postage for shipping products, the IRS classifies this as a cost of goods sold (COGs) expense, instead of an office supply expense.
Furniture for your office space is also deductible, although, depending on the purchase, these expenses may need to be depreciated.
Cost Of Goods Sold
In addition to postage for shipping products, expenses that fall into the cost of goods sold tax deduction can include merchandise, raw materials, packaging materials, and freight.
Calculating this particular tax deduction can be tricky, so talk to your accountant about the best way to take the COGs tax deduction for your business — and don’t forget to provide your accountant with an inventory count from the beginning and end of the financial year.
Tools & Equipment
Tools and equipment that are necessary for your business are also deductible, so long as these tools can be used within one year. Larger equipment that lasts longer than a year, such as computers or machinery, cannot be deducted as usual and may need to be depreciated instead.
Repairs & Maintenance Costs
You can deduct the cost of repairs and maintenance of a property, so long as the total is less than $10,000 or less than 2% of the unadjusted asset basis of the property (meaning the original purchase cost of the asset, not the current value). Whichever amount is less is what will determine your deduction.
Only businesses that earn under $10 million qualify for this deduction. The unadjusted asset basis of the building also must be less than $1 million to qualify. Depending on the repair, this deduction may need to be depreciated so be sure to talk to your accountant about how to properly write off this expense.
Rent
If you rent an office or building that you use solely for operating your business, you can deduct rent. The stipulation is that, according to the IRS, if you “have or will receive equity in or title to the property,” you cannot write off the rent as a deduction.
Moving Expenses
While personal moving expenses are deductible, you can still deduct moving expenses if you relocate your business. You can fully deduct any expenses related to moving such as packing and transport.
This deduction only applies if your business is a corporation or LLC.
Utilities
Your business’s utilities can be a tax write off, so long as they are strictly business expenses. Utilities include:
- Heating
- Telephone services
- Electricity
- Sewage
- Water
You may be able to write off a portion of your personal utilities for the business use of your home office. See the home office deduction for more information.
Internet Services
If the internet is a requirement for running your business (and when isn’t it in the 21st century?), then your internet services count as a deductible expense.
Depending on your business entity, where you write this tax deduction off on your tax forms will vary. Talk with your accountant about the proper way to take this business tax deduction, and keep records of your monthly Internet bills.
Software
If your business requires specific software to operate, you can deduct the software cost or monthly subscription.
If you use accounting software like QuickBooks Online or Xero, your monthly fees are deductibles. If you use project management software like Basecamp or Trello, your subscription is deductible. If you use email marketing software like Drip or a website builder like Squarespace, you guessed it, deductible.
Employee Benefits
Did you know that being a good employer can save you money on your taxes? Offering beneficial and competitive benefits to your employees doesn’t just help you acquire and hold onto quality employees; it also helps you come tax season.
In most instance, you can deduct the following employee benefits:
- Health plans
- Retirement plans
- Sick pay
- Vacation pay
- Accident coverage
- Life insurance coverage
- Welfare benefit funds
- Cafeteria plans
- Adoption assistance
- Dependent care assistance
If you give bonuses to your employees, you can also count these bonuses as a deductible business expense. Don’t forget that employee bonus checks are still liable to payroll withholding taxes like FICA.
Employee Wages
As long as you are paying reasonable wages to your employees for work or services performed, you can deduct this cost. Certain employee awards can also be deducted, although there is a deduction limit.
Independent contractor wages can also be deducted so long as you are paying reasonable wages.
Commissions
Since commissions are considered a part of an employee’s wages (even if the commission is on top of regular wages or salaries), commissions are a deductible tax expense.
Employee Education
Many employers now offer education assistance to their employees. The good news? Most often these fees are deductible up to a certain amount. You can write off work-related education expenses for your employees, including:
- Tuition
- Books & supplies
- Lab fees
- Certain transportation & travel costs
There is a $5,250 limit and you must also have a written employee assistance program to qualify for this deduction. If you are self-employed, you can also deduct the cost of your education, so long as it is related to your business.
Talk to your accountant for the specific rules and regulations regarding this particular tax deduction.
Insurance Premiums
Certain insurance premiums are often tax-deductible, including insurance for:
- Fire
- Storms or floods
- Theft
- Accident
- Loss
- Liabilities
- Malpractice
Those who are self-employed can also benefit from the added health insurance deduction. Learn more about what insurance your business needs in our small business guide to business insurance.
Taxes
Certain taxes also count as a deduction, believe it or not. For example, real estate taxes and income taxes often count as a deduction.
Legal Fees
Most legal and professional fees are deductible. Examples of typical fees include the cost of:
- Lawyers
- Accountants
- Tax preparers
Bank & Credit Card Fees
As a small business owner, you can write off fees associate with your bank or credit card institutions. These fees could include monthly service fees, annual fees, overdraft fees, transfer fees, etc.
Another surprise, you can even deduct credit card processing fees.
Interest
In most cases, you can deduct all interest paid or accrued during a tax year, so long as you are legally liable for the debt. You can deduct a part of the interest if you are only partially liable.
Certain types of interest are not accepted, so be sure to contact your accountant or tax professional for the most accurate information.
Startup Costs
Is your business a startup? You’re in luck since the IRS allows businesses to write off $5,000 worth of startup costs.
To qualify for this tax deduction, your startup costs can be no more than $50,000. If your business exceeds this limit, that doesn’t necessarily mean you can’t take the deduction — you’ll just qualify for a smaller write-off amount. But, if your startup costs were more than $55,000, you do not qualify for this deduction. Thankfully, there are 29 other small business tax deductions on this list that you may be eligible for that can save you money on your small business tax return.
Advertising & Marketing Expenses
Does your business pay for a billboard or local advertising? Did you purchase 500 t-shirts and mugs to hand out at a promotional event? Did you opt for Google Ads, Facebook Ads, business cards?
Usually, you can deduct all advertising expenses that are related to marketing your business.
Research & Experimental Costs
If your business is conducting research or experiments, you may be able to write off all expenses related to that research.
Your mind might immediately jump to large tech companies coming up with new prototypes or businesses in the medical field experimenting on new treatments and discoveries. However, while these businesses could be eligible for this deduction, the definition of “research and development” is a lot broader.
Research and development (R&D) count as creating:
- New products
- Formulas
- Processes
- Techniques
Not sure whether the work you do counts as a R&D cost? Talk to your accountant. You’ll also want to bring your accountant into the conversation because, while you used to be able to fully write off research and experiment costs, in 2022 these costs will have to be amortized, which can get complicated.
Cleaning & Janitorial Expenses
If you pay for janitorial or cleaning services for your business or office, this expense counts as a deduction on your small business tax return.
Intangibles
There’s a unique category of deductions for business assets that are considered “intangible,” or assets that aren’t physical. This deduction includes:
- Licenses
- Permits
- Trademarks
- Patents
- Copyrights
- Patterns
The list of intangibles is long, so be sure to check out the IRS’s long list of rules and regulations regarding business expenses and tax deductions. Certain intangibles require amortization over a period of time, so be sure to consult your accountant or tax preparer to properly take this business deduction.
Charitable Donations
The charitable donations tax deduction is a tricky one because it depends entirely on your business structure. Only corporations can count charitable donations as a write off for their businesses. All other types of business are considered a pass-through business, which means that the business taxes pass through the business owner’s taxes and get taxed at the individual level instead of the corporate level.
Pass-through businesses include:
- Sole proprietors
- Partnerships
- Limited liability companies (LLCs)
- S-corporations
The good news? Business owners with a pass-through business structure can still write off charitable donations — the donations will just be considered a personal deduction on your individual tax return rather than a “business” deduction.
What If I Missed A Business Tax Deduction?
Now you know that there are dozens of business deductions out there. But what if you missed a key deduction last year or didn’t take any deductions at all?
You’re not out of luck yet. Some deductions are retroactive, meaning you can have your tax filings reevaluated to include these deductions. Talk to your accountant to learn more.
What Do PPP Loans & EIDL Advances Mean For Tax Deductions?
As a small business owner, it’s possible that you took advantage of Paycheck Protection Program loans, Economic Injury Disaster Loans (EIDL), and EIDL Advances. These programs were put in place to help struggling business owners during the COVID-19 pandemic. One thing that many small business owners wondered is how receiving these loans and grants would affect their taxes and deductions.
The good news is that business expenses paid for with PPP, EIDL, and EIDL Advance funds are deductible on your business tax return. Even if your PPP loan is forgiven or you received an EIDL grant that does not have to be repaid, all qualifying business expenses are still completely deductible. For example, let’s say that you received a PPP loan and used the funds to pay employee wages and benefits, rent, and utilities. Not only will you receive forgiveness for your loan, but you can also write these expenses off on your tax return to lower your tax liability.
As with all other deductions, make sure that you keep all records and documentation surrounding your loan, grant, loan forgiveness, and expenses. Still have questions about what COVID relief means for your business come tax time? Learn more about how PPP loans and EIDL grants will affect your taxes this year.
What Do New Tax Laws Mean For Small Businesses?
In December of 2017, Congress signed the Tax Cuts and Jobs Act (TCJA), which went into effect on January 1, 2018. Many reporters and tax professionals consider this the biggest tax reform in decades, and most ordinary people are still trying to figure out precisely what all of these changes mean for both themselves as individual taxpayers and the businesses they run.
According to the same QuickBooks study mentioned earlier, small business owners have mixed feelings about the TCJA tax reform. Thirty-two percent of business owners think the reform will benefit their business, while 19% say it will poorly affect business — and 22% have heard about the changes to the tax laws but have no idea what the impact will be.
Whether the tax reform is for the better or worse, we can shed a little light on what these laws actually mean. Read on for a brief overview of the main tax reform changes that will affect small businesses and their business deductions this tax season.
Start Saving On Your Tax Return
Feeling overwhelmed yet? That’s okay. This post may contain a lot of information, but that means a lot of savings for you!
As the Tax Cuts and Job Act continues to be implemented, these new laws will only become clearer, and we’ll keep updating this post to make things as easy for you as possible. While this tax reform is still being fully realized, your accountant is your best friend. If you have any questions or concerns about which deductions you are eligible for and which small business expenses you can write off, talk to your accountant or another tax professional for the most accurate business advice.
To see if you are ready for other aspects of the tax season, check out our Small Business Tax Prep Checklist. For additional help filing your taxes, read our article on How To Get The Most Out Of Your Accounting Software This Tax Season and see our top picks for the Best Tax Software For Filing Small Business Taxes. Happy filing!
Super very imformative
This comment refers to an earlier version of this post and may be outdated.
Thank you for your article.
I’m looking for an automatic MilageTracker and am interested in the trackers in Quicken Home & Business and QuickBooks.
I’ve used Stride and like it because it allows you to use a “Start Driveing” button and a “Finished Driving” button. It tracks both milage, time worked and calculates the milage tax deduction with on going totals.
Others chop up the data when you don’t move for 3 or 4 minutes and send an alert to you every time…. irritating.
Does Quicken H&B and/or QuickBooks Self-Employed function like Stride AND sync it from their phone app GPS tracker to their financial software?
Thank you
This comment refers to an earlier version of this post and may be outdated.
Hi James,
In theory, QuickBooks Self-Employed is supposed to have this function; however, the last time we reviewed QuickBooks Self-Employed there were a lot of user complaints about the mileage tracker not working in the correctly. Granted, there are some users who report positive experiences with the app, so it still might be worth a shot (especially if QuickBooks has updated the app to resolve the previous issues). As far as I know, mileage has to be entered manually into Quicken Home & Business.
If QuickBooks has worked out their mileage tracking kinks, that is probably your best bet, but I’ll leave this open for any other readers who may have found a good solution to this.
Best of luck,
-Chelsea Krause
This comment refers to an earlier version of this post and may be outdated.
Thanks for the info Chelsea ~ well written and informative.
I have a question about using a property as an office. I am looking at purchasing a small condo (about 350 sf) and using this only as an office. I would be living in another condo, so the smaller space would only be used for working. Would the entire cost of this property be deductible?
This comment refers to an earlier version of this post and may be outdated.
Hi Dave,
Thanks for reaching out! So long as the space is used solely for business purposes, you should be able to write it off in the same way you would write off a business rental. With business rentals, generally the cost of rent and utilities are deductible. However, I would check with your accountant to be certain and to learn which records you’ll need to keep in order to prove that you qualify for this deduction.
Best of luck,
-Chelsea Krause
This comment refers to an earlier version of this post and may be outdated.
Very Informative post. What about Renting or Leasing a commercial office space, I’m sure the Rent/Lease can be deducted as well?
This comment refers to an earlier version of this post and may be outdated.
Hi Cathy,
So long as the space was used solely for your business you should be able to deduct that as well!
Best wishes,
-Chelsea Krause
This comment refers to an earlier version of this post and may be outdated.
Hi Chelsea I just set up a home business selling collectibles on line. My question is can i deduct a sofa and love seat for my clients to sit in when they come to my home? It would be exclusively for business use within the home office square footage.
This comment refers to an earlier version of this post and may be outdated.
Hi Russell,
Thanks for reaching out! You should be able to write off office furniture so long as it is used exclusively for your business and within your home office (as you mentioned). However, I would double check with your accountant to be 100% certain. Sometimes taking certain deductions (particularly the home office deduction) can trigger a red flag for the IRS and lead to an audit. This doesn’t mean you should take the deductions you are eligible for, but it does mean you should enlist the help of a professional CPA or enrolled agent to advise you on the best way to file your taxes and deduct expenses.
Good luck!
-Chelsea Krause
This comment refers to an earlier version of this post and may be outdated.
Impressive post specially the points you mentioned about the strategies could help me in my business. Some of the points were familiar to me and some them is very new for me.
Thank you so much for sharing this post with us. I’ll follow your blog posts from today onward.
Great Job!
This comment refers to an earlier version of this post and may be outdated.
Glad you found the post helpful!
Best of luck this tax season,
-Chelsea Krause
This comment refers to an earlier version of this post and may be outdated.
Hi, I started a business TurboTax online let’s you claim office supplies such as TVs couches computer or laptop software for your business and you say you can’t and you can so why would you say you can’t but my first question is I’m building a app for my business can you write that off?
This comment refers to an earlier version of this post and may be outdated.
Hi Ronald,
To clear up any confusion, you can deduct office supplies (such as ink, paper, and even office furniture) and you can deduct software needed to run your business. We mention both of these deductions in our post. In regard to the other question, I would need to know more about the app to give an answer. I recommend speaking directly with an accountant to get the best tax advice about your current situation. I know that TurboTax has in-house CPAs that can help you file, which might be a good way to go in your case since you’re already using TurboTax.
Best wishes,
-Chelsea Krause
This comment refers to an earlier version of this post and may be outdated.
Nicely researched and then served to the audience. Not all bloggers do this. Thanx for delivering the genuine information.
This comment refers to an earlier version of this post and may be outdated.
Hi Susan,
I’m so glad you found this post helpful!
Best of luck this tax season,
-Chelsea Krause
This comment refers to an earlier version of this post and may be outdated.
Hi Chelsea!
Thank you for the informative content!
I would like to know if educational cost also includes purchasing courses in order to start a business including a course to learn drop shipping, print on demand, or affiliated marketing. What if we had a coach to help us get started? Are we able to include all of these courses and coaching cost under educational expenses? Is there a limit on what educational expense include?
Thank you for the clarifications!
Jenny
This comment refers to an earlier version of this post and may be outdated.
Hi Jenny,
Great question! Businesses can often qualify for educational deductions; however, this will vary significantly based on your business type and filing situation. Here is what the IRS has to say about business educations deductions. I highly recommend speaking with an accountant or tax professional to see if your particular business qualifies for this deduction.
Best wishes,
-Chelsea Krause
This comment refers to an earlier version of this post and may be outdated.
Thank you for these tips on the tax deductions. I’m needing help with my taxes. I’ll have to look into finding the best tax service in my area.
This comment refers to an earlier version of this post and may be outdated.
You’re welcome, Ellie! I’m glad you found these deductions helpful and wish you the best of luck with your business taxes this year!
Best wishes,
-Chelsea Krause
This comment refers to an earlier version of this post and may be outdated.
That is cool that you can count your passport purchase as a business expense. It would be nice to travel somewhere for work. Then I could have a passport and deduct the taxes.
This comment refers to an earlier version of this post and may be outdated.
Thank you for this wonderful article! Can I deduct clothes? I have to wear business casual clothes when I meet with clients.
This comment refers to an earlier version of this post and may be outdated.
Hi Tonja,
The IRS doesn’t allow you to deduct clothes that you can wear outside of work as well, so you won’t be able to deduct business casual clothes. If you were self-employed and had to buy specific clothing that is related solely to your job (like a hard hat for construction), then that would be deductible. Here’s an article with more information about clothing deductions. I hope that helps!
Best wishes,
-Chelsea Krause
This comment refers to an earlier version of this post and may be outdated.
Thank you for the info you post. Sometimes new businesses can not afford a tax service.
Question: I started a new wheel chair van transport service. We are on the road all day. Can I deduct meals ( MacD./BurgerK/Deli) as a business expense?
This comment refers to an earlier version of this post and may be outdated.
Hi there Tonja!
Thanks for reaching out. The new Tax Cuts and Jobs Acts has eliminated entertainment deductions, and as meals and entertainment were often lumped together, there has been some confusion as to whether or not meals can still be deducted. According to the Journal of Accountancy, you can still deduct meals; however, I would consult a tax professional for the most current information and the best advice on how to prepare your deductions.
Best wishes,
-Chelsea Krause
This comment refers to an earlier version of this post and may be outdated.
That is really interesting that you can deduct tax fees from office supplies needed to run the business. If I were going to start a business then it would be nice to be able to deduct that from taxes. That is something to keep in mind if I ever start a business.
This comment refers to an earlier version of this post and may be outdated.
Thank you Chelsea for writing this detailed post and i am really impressed from the way you explained things and make it easy to understand.
This comment refers to an earlier version of this post and may be outdated.
Hi there!
I’m glad you found this post helpful! We’ll be updating this post soon to reflect this year’s tax deductions more accurately. We’re also excited to have some new tax content in the pipeline for the spring, so stay tuned for more articles like this!
Best wishes,
-Chelsea Krause
This comment refers to an earlier version of this post and may be outdated.
Think theres some inaccurate info here. Recent tax cut act removed entertainment deduction as an example.
This comment refers to an earlier version of this post and may be outdated.
Hi Mike,
Thanks for bringing this to our attention. We haven’t updated this post since the recent tax changes but will be updating it in the next few weeks to ensure it’s 100% accurate before tax season. Stay tuned!
Best wishes,
-Chelsea Krause
This comment refers to an earlier version of this post and may be outdated.
Hi Chelsea – great article. I was wondering if Saas software such as NetSuite would qualify for the tax deduction?
This comment refers to an earlier version of this post and may be outdated.
Hi Crystal,
Thanks for reaching out! NetSuite should qualify as a deduction. However, I’d talk to your accountant to figure out the best way to deduct this from your taxes. Your accountant will also know how much you can deduct and the best way to mark this on your tax forms. I hope this helps!
Best wishes,
-Chelsea Krause
This comment refers to an earlier version of this post and may be outdated.