updating the javascript