added javascript and modified the html file