 	}
 
 	public var startIndex: IndexPath {
+		if sections.isEmpty {
+			return IndexPath(row: 0, section: 0)
+		}
+
 		let start = sections.startIndex
 		return IndexPath(row: sections[start].startIndex, section: start)
 	}
 
 	public var endIndex: IndexPath {
-		let end = sections.index(sections.endIndex, offsetBy: -1, limitedBy: sections.startIndex) ?? sections.startIndex
-		return IndexPath(row: sections[end].endIndex, section: end)
+		return IndexPath(row: 0, section: sections.endIndex)
+	}
+
+	public var count: Int {
+		return sections.reduce(0) { $0 + $1.count }
 	}
 
 	public func index(before i: IndexPath) -> IndexPath {
+		precondition(i > startIndex)
+
 		let section = sections[i.section]
 
 		if let index = section.index(i.row,

	}

	var startIndex: Int {
		return storage.startIndex
	}

	var endIndex: Int {
		return storage.endIndex
	}

	subscript(position: Int) -> E {

			return IndexPath(row: index, section: i.section)
		}

		let next = sections.index(i.section, offsetBy: 1)
		if next == endIndex.section {
			return endIndex
		}

		return IndexPath(row: sections[next].startIndex, section: next)
	}
	
	public subscript(position: IndexPath) -> E {
