table creation is now conditional and number of records is reported