`CookieMessage` isn't scoped, probably best to go with a named function for consistency