new method connectDB to draw data from DB