update in js