added _getDb api as well