ChatGPT just made my code significantly more readable, improved error handling too, by suggesting a while loop over my recursion approach. Looks like I owe an apology for tearing down his claims that it improves productivity. Helped me resolve an annoying bug.