update the JavaScript