moving JS out of HTML file