updating views and js code