empty db ckecking added