move js to own file