added new TableHasRows condition