separated looper js into its own file