refactor table.rb - step 8