update script improved