refactored title_case.rb