         data.append(contentsOf: [0x2e, 0x0a]) // dot newline
     }
     
-    public func serialize<T: TextOutputStream, S: Sequence>(_ triples: S, to stream: inout T) throws where S.Element == Triple {
+    public func serializeHeader<T: TextOutputStream>(to stream: inout T) {
         if prefixes.count > 0 {
             for (k, t) in prefixes {
                 stream.write("@prefix \(k): ")

            }
            stream.write("\n")
        }
        
        let subjects = Dictionary(grouping: triples) { $0.subject }
        for (i, s) in subjects.keys.sorted().enumerated() {
            let triples = subjects[s]!


open class TurtleSerializer : RDFSerializer {
    public var canonicalMediaType = "application/turtle"
    public var prefixes: [String:Term]
    
    public init(prefixes: [String:Term]? = nil) {
        self.prefixes = prefixes ?? [:] // TODO: implement prefix use
