refactoring default.rb