move js to external file