updating UI and js