Made some changes to rupgrade