javascripts controller update