updated javascript and HTML