removed js from html to external js file