This is what this.state.upgrade() does at the start of the function - but maybe we should be giving a parameter to terminate, not to switch to the terminate state if we're upgrading.