modified the javascript and html