changed the javascript