add table_exists method