I was trying to keep this refactoring semantically identical to the original :-)