changes to upgrade script