moved js library into its own file