a bit of code that I wrote