split into an html file and a js file