You can extract this into a helper.