     
     internal var connection: UnsafeMutablePointer<mongo>? = mongo_alloc()
 
-    public var databaseName: String
+    internal var databaseName: String
+    
+    public var db: String { // read only
+        get {
+            return self.databaseName
+        }
+    }
+    
+    public func changeDB(databaseName: String) {
+        self.databaseName = databaseName
+    }
+
     internal var collections = Set<MongoCollection>()
     
 


        self.collections.insert(collection)
    }
}

    - parameter database:    The database, ex: 'test'
    - parameter userAndPass: The username and password for the user in the format (username, password) - optional.
    */
    public init(host: String, port: Int, database: String, usernameAndPassword userAndPass:(username: String, password: String)? = nil) {
        
        mongo_init(self.connection!)

        let status = mongo_client(self.connection!, host, Int32(port))

        if status != MONGO_OK {
            print("connection failed")
            mongo_destroy(self.connection!)
