move JS to its own file