separated js into its own file