This looks like a good place to extract a helper...