Slight tweak of the above with a bit more in the comment to explain why we're doing what we're doing.