move js out of index.html