move js to its own file