check for the expected number of records. added support for additional tables.