change javascripts endpoint