checking db connection