This should be a static function.