update ui and js