improve upgrade