Added function for retrieving tables from material