Nice factoring out into a static function. The world needs more of it.