new built code with upgrades