Claude: You got me there. I found similar code on Stackoverflow and copied the most credible-looking explanation.