simplify table exists