separated the js from the html