generate is static function