added upgrades stuff. still need to go over the type stuff