refactor table.rb - step 5