move js into its own file