moved update before install and added upgrade