refactoring: extracted function install