update the install script with more conditions