refactor table.rb - step 6