Changed the javascript