Seems like a good opportunity to extract this into a private method.