move js to new file