Documented the table generator function