reworking the update script