refactored deploy.rb