replaced variable upgradelevel