improve update script