need help adding debounce to my code

No, look at Nick Gammon's code on page 3, its a lot, but it works. And it has a test you can do too.

If you want, you can also take the debounce code in your Arduino examples, and convert it to use arrays and the use of a FOR loop.