replaced gettablefields with getTableColumns()