             "ContentIdentifier" : contentIdentifier,
             "ContentVersion" : contentVersion,
             "DeploymentTarget" : deploymentTarget,
-            "Chapter" : [] as [String]
+            "Chapters" : chapters.map({ $0.name + ".playgroundchapter" }) as [String]
         ]
         if let imageReference = imageReference {
             dict["ImageReference"] = imageReference

    let deploymentTarget: String
    var chapters: [Chapter]
    
    init(name aName: String, version aVersion: String, contentIdentifier aContentIdentifier: String, contentVersion aContentVersion: String, imageReference anImageReference: String? = nil, deploymentTarget aDeploymentTarget: String) {
        name = aName
        version = aVersion
        contentIdentifier = aContentVersion
        contentVersion = aContentVersion
        imageReference = anImageReference
        deploymentTarget = aDeploymentTarget
        chapters = []
    }
    
    var path: String {

        }
    }
    
    func getChapter(name: String) throws -> Chapter {
        for i in 0..<chapters.count {
            if chapters[i].name == name {
                return chapters[i]
            }
        }
        throw NSError.error(description: "Not found")
    }
    
    mutating func add(chapter: Chapter) throws {
        chapters.append(chapter)
        do {
            try writeManifest()
        } catch {
            throw error
        }
    }
    
