better check of existence of tables.