add logic to install hosted and packaged apps