updated db connection condition