adds method to make table creation dynamic