moved JS to external file