         XCTAssertEqual(insertReply.insertCount, dummyAccounts.count)
         return dummyAccounts
     }
+
+    // is used repeatedly for some of the tests that require large dummy data
+    func testBulkCreateDummyAccounts () throws -> [DummyAccount] {
+        var dummyAccounts: [DummyAccount] = []
+
+        for index in 0...4 {
+            for age in 1...100 {
+                dummyAccounts.append(DummyAccount(name: "Name-\(age + index * 100)", password: "Pass-\(age + index * 100)", age: age))
+            }
+        }
+
+        let documents: [Document] = try dummyAccounts.map { dummyAccount in
+            try BSONEncoder().encode(dummyAccount)
+        }
+        
+        var command: InsertCommand = InsertCommand(documents: documents, inCollection: DummyAccount.collectionName)
+        command.writeConcern = concern
+        let connection: MongoConnection = try mongo.pool.next(for: .init(writable: false)).wait()
+        let insertReply: InsertReply = try connection.executeCodable(command, namespace: mongo.commandNamespace, in: nil, sessionId: mongo.sessionId).decodeReply(InsertReply.self).wait()
+        
+        XCTAssertEqual(insertReply.ok, 1)
+        XCTAssertEqual(insertReply.insertCount, dummyAccounts.count)
+        return dummyAccounts
+    }
     
     func readDummyAccount (name : String) throws -> DummyAccount? {
         let schema: MongoCollection = mongo[DummyAccount.collectionName]
         return try schema.findOne("name" == name, as: DummyAccount.self).wait()
     }
-    
+
     func testReadDummyAccounts () throws {
         try _ = testBulkCreateDummyAccounts()
-        if let dummy: DummyAccount = try readDummyAccount(name: "Them") {
-            XCTAssertEqual(dummy.password, "to")
+        if let dummy: DummyAccount = try readDummyAccount(name: "Name-182") {
+            XCTAssertEqual(dummy.password, "Pass-182")
             XCTAssertEqual(dummy.age, 82 )
         } else {
             XCTFail("Retrieved a nil value")
         }
     }
     
+    func testReadLargeBulkAccounts () throws {
+        let dummyAccounts: [DummyAccount] = try testBulkCreateDummyAccounts()
+        let schema: MongoCollection = mongo[DummyAccount.collectionName]
+        let age50Duplicates = try schema.find("age" > 50).decode(DummyAccount.self).allResults().wait()
+        XCTAssertEqual(age50Duplicates.count, dummyAccounts.filter{$0.age > 50}.count)
+    }
+
     func testReadDistictAge () throws {
         let dummyAccounts: [DummyAccount] = try testBulkCreateDummyAccounts()
         let schema: MongoCollection = mongo[DummyAccount.collectionName]

        let startingCount: Int = try schema.count().wait()
        
        let dummyAccount = DummyAccount(name: "Dum", password: "my", age: 69)
        let _ = try schema.insertEncoded(dummyAccount).wait()
        XCTAssertEqual(try schema.count().wait(), startingCount+1)
    }
    
    // is used repeatedly for all the tests that require dummy data
    func testBulkCreateDummyAccounts () throws -> [DummyAccount] {
        let dummyAccounts = [
            DummyAccount(name: "Test", password: "ing", age: 77),
            DummyAccount(name: "To", password: "see", age: 10),

          self._id = ObjectId()
          self.name = name
          self.password = password
          self.age = age
        }
    }

    struct DummyAccountAlt: Codable, Equatable {
        static let collectionName = "DummyAccounts"
        
        let _id: ObjectId
        var firstName: String
        var lastName: String
        var age: Int
        
        init(firstName: String, lastName: String, age: Int) {
          self._id = ObjectId()
          self.firstName = firstName
          self.lastName = lastName
          self.age = age
        }
    }
