updating preview