modified db connection