         ////////////////////////////////////////////////
         let renderSize = ExportedVideoSize
         let mainComposition = AVMutableVideoComposition(propertiesOfAsset: mixComposition)
-        mainComposition.instructions = [introInstruction, tienInstruction]
+        mainComposition.instructions = instructions
         mainComposition.frameDuration = CMTimeMake(1, 30)
         mainComposition.renderSize = renderSize
-        
         mainComposition.animationTool = AVVideoCompositionCoreAnimationTool(postProcessingAsVideoLayer: videoLayer, inLayer: parentLayer)
         ////////////////////////////////////////////////
         ////////////////////////////////////////////////

                  duration: 0.35,
                  beginTime: atTime.seconds + 1.0,
                  fromPoint: tienTitleTextLayer.position,
                  toPoint: CGPoint(x: (parentLayer.bounds.width/2 - videoItemSize.width/2)/2,
                    y: tienTitleTextLayer.position.y),
                  damping: true)
        
        moveLayer(tienTitleTextLayer,
                  duration: 0.35,
                  beginTime: atTime.seconds - 1.0 + tienAsset.duration.seconds,
                  fromPoint: tienTitleTextLayer.position,
                  toPoint: CGPoint(x: -parentLayer.bounds.width/2,
                    y: tienTitleTextLayer.position.y),
                  damping: true)
        
        hideLayer(tienTitleTextLayer,
                  hidden: true,
                  duration: 0,
                  beginTime: atTime.seconds + tienAsset.duration.seconds)
        
        //// Instruction
        let tienTrack = composition.addMutableTrackWithMediaType(AVMediaTypeVideo, preferredTrackID: Int32(kCMPersistentTrackID_Invalid))
        try! tienTrack.insertTimeRange(CMTimeRangeMake(kCMTimeZero, tienAsset.duration), ofTrack: tienAsset.tracksWithMediaType(AVMediaTypeVideo)[0], atTime: atTime)
        let tienLayerInstruction = videoCompositionInstructionForTrack(tienTrack,
                                                                       asset: tienAsset,
                                                                       fixRotate: true,
                                                                       frame: CGRect(origin: CGPoint(x: ExportedVideoSize.width/2 - videoItemSize.width/2, y: 0),
                                                                        size: videoItemSize))
        
        let tienInstruction = AVMutableVideoCompositionInstruction()
        tienInstruction.timeRange = CMTimeRangeMake(atTime, tienAsset.duration)
        tienInstruction.backgroundColor = backgroundColor
        tienInstruction.layerInstructions = [tienLayerInstruction]
        
        
        let endTime = CMTimeAdd(startTime, tienAsset.duration)
        return (tienInstruction, endTime)
        
    }

        videoLayer.frame = CGRect(origin: .zero, size: ExportedVideoSize)
        parentLayer.addSublayer(videoLayer)
        
        var instructions: [AVMutableVideoCompositionInstruction] = []
        let (introInstruction, introEndTime) = addIntroScenceAtTime(atTime,
                                                                    parentLayer: parentLayer,
                                                                    composition: mixComposition,
                                                                    videoItemSize: videoItemSize)
        
        atTime = introEndTime
        instructions.append(introInstruction)
        ////////////////////////////////////////////////
        
        
        ////////////////////////////////////////////////
        for (index, asset) in assets.enumerate() {
            var title: String = ""
            switch index {
            case 0:
                title = "Tien"
            case 1:
                title = "Sunny"
            case 2:
                title = "Tam"
            case 3:
                title = "Tai"
            case 4:
                title = "Cuong"
            default:
                title = ""
            }
            let (instruction, endTime) = addVideoItemScenceAtTime(atTime,
                                                                  parentLayer: parentLayer,
                                                                  composition: mixComposition,
                                                                  videoAsset: asset,
                                                                  title: title,
                                                                  videoItemSize: videoItemSize)
            atTime = endTime
            instructions.append(instruction)
        }
        ////////////////////////////////////////////////
        
        
