added start of table building functionality