connectDB() functionality