 		}
 		XCTAssertEqual(i, numberoflines)
 		XCTAssert(result != "")
-		f.closeFile()
+		(f as NSFileHandle).closeFile()
 		return times
 	}
-	
+
 	func testWhenSplitFileAsStringBecomesQuicker() {
 		let splitarray = allSpeedsSplitFileAsString()
 		let myarray = allSpeedIterateOverFile()

			}
			XCTAssertEqual(i, self.numberoflines)
			XCTAssert(result != "")
			f.closeFile()
		}
	}	
	
	func allSpeedsSplitFileAsString() -> Array<UInt64> {
		let longtextpath = pathForTestResource("long text", type: "txt")

		// set initial size of array.
		var times = Array<UInt64>(count: numberoflines, repeatedValue: 0)
		
		let f = open(longtextpath)
		let start = mach_absolute_time()

		let text = f.read()
		let array = (text.split("\n"))
		
		var i = 0
		var result = ""
		for line in array {
			
			times[i++] = (mach_absolute_time() - start)
			result += line
		}
		
	XCTAssertEqual(i, numberoflines)
		XCTAssert(result != "")
		f.closeFile()
		return times
	}
	
	func allSpeedIterateOverFile() -> Array<UInt64>{
		let longtextpath = pathForTestResource("long text", type: "txt")
		var times = Array<UInt64>(count: numberoflines, repeatedValue: 0)
		
		let f = open(longtextpath)
		let start = mach_absolute_time()


			}
			XCTAssertEqual(i, self.numberoflines)
			XCTAssert(result != "")
			(f as NSFileHandle).closeFile()
		}
	}

	func testSpeedSwiftShellSplit () {
		let longtextpath = pathForTestResource("long text", type: "txt")
		self.measureBlock() {
			let f = open(longtextpath)

			var i = 0
			var result = ""
			for line in f.lines() {
