modified the update script