add upgradestep and changed unsubscribe event handler