Can I withdrawal my cost basis from my Roth IRA without penalty?

I opened a traditional IRA in 1990.  In 1997 when the Roth IRA was introduced, I converted 100% of my traditional IRA to a Roth. I had about $24,000 in it at the time. Back then the IRS has a special rule that allowed taxes on converted funds to be paid out over 4 years. So I claimed $6,000 per year for 4 years as ordinary income and paid taxes on it.

 

The cost basis worksheet I have been keeping for the last 2 decades shows I have a cost basis of $40,000.  Im assuming this is comprised of the $24,000 I converted PLUS $16,000 of contributions I made when it was a traditional IRA that I did not take a deduction on.  

 

I'm assuming if I withdrawal all $40,000 this year, I will not have to pay any tax on it, plus I wont have an early withdrawal penalty.  Im 56 years old.  Is my thinking correct?