Changed DB connection implementation