Table to class