...but that's very specific to that code, and even if you don't go for a full-on functional programming approach, it's not great to have functions with side-effects like that. But sometimes needs must.