update ui & preview