Good pickup. I've split this out into two functions... there actually was not a lot of common code between the two, and the clarity of the new use case is improved.