update the javascript