update with working update function