update preview when change