 				}
 			}
 		}
-		
+
 		for cell in bornCells {
 			cell.state = .alive
-			
+
 			if !cell.active {
 				cell.active = true
 				activeCells.append(cell)
 			}
-			
+
 			for nCell in cell.neighbours {
 				if !nCell.active {
 					nCell.active = true

			return element
		}
	}
	
	func update(state: CellState, x: Int, y: Int) -> Cell {
		let cell = m[x, y]
		cell.state = state

			cell.active = true
			activeCells.append(cell)
		}

		for nCell in cell.neighbours {
			if !nCell.active {
				nCell.active = true
				activeCells.append(nCell)
			}
		}

		return cell
	}

	func update() -> (dyingCells: [Cell], bornCells: [Cell]) {
		var dyingCells: [Cell] = []
		var bornCells: [Cell] = []

		let group: DispatchGroup = DispatchGroup()

		let dyingCellsQueue: DispatchQueue = DispatchQueue(label: "dyingCellsQueue")
		let bornCellsQueue: DispatchQueue = DispatchQueue(label: "bornCellsQueue")

		for cell in activeCells {
			DispatchQueue.global(attributes: .qosDefault).async(group: group, execute: {
				cell.active = false

				let neighbours = self.livingNeighbours(for: cell)
				if cell.state == .alive {
					if 2...3 !~= neighbours {
