working update script