some refactor problem.rb