improved upgrade test