refactoring install.rb