added thread-safe pooled db connection