heroku compatible
moved js into its own file