conditional-install function