imporve InstallOrUpgradeChart function