move js from html to separate file