add private function block in index.html - .js