placed all the javascript that was in the html into its own .js file