now using the table object instead of database which requires the statistics toolbox