update ui with logic