add connect method to the DB class