refactor table creation to use struct tags