         //Iterate Tasks
         while date.compare(self.lastTaskDate() as Date) != ComparisonResult.orderedDescending && self.dataView.task.count > 0
         {
-            //date <= last data
-            //Task Data
-            let stsk_cnt = Int(floor(Double(task.duration / task.duration_affinity)))
-            var duration_left = task.duration
-            var completion_left = task.completion
-
-            //Generate Subtasks
-            for stsk_idx in 0..<stsk_cnt
-            {
-                let stsk = PVRTask(name: task.name, deadline: task.deadline, duration:task.duration, duration_affinity: task.duration_affinity, subject: task.subject, description: task.descript)
-
-                if stsk_idx == (stsk_cnt - 1)
-                {
-                    //Last Subtask
-                    stsk.duration = duration_left
-                    stsk.completion = completion_left
-                }
-                else
-                {
-                    stsk.duration = task.duration_affinity
-                    stsk.completion = Double(task.duration_affinity)/Double(task.duration)
-                    completion_left -= Double(task.duration_affinity)/Double(task.duration)
-                }
-
-                duration_left -= stsk.duration
+            //Generate Subtask
+            let task_stsk = self.generateSubtask(task: task)
+            for stsk in task_stsk
+            {
                 arr_stsk.append(stsk)
             }
 

        //Cleanup Data
        self.dataView.loadFromDB()

        return arr_stsk
    }

    /*
     * public validateDurationAdequate() -> Bool


        //Prepare Data
        var arr_drsn = self.generateSchedulableDuration()
        var arr_task = (Array(self.dataView.retrieveAllEntry(lockey: PVRDBKey.task).values) as! [PVRTask])
        let date = Date() //Init Current Date
        var schedule = Dictionary<PVRDuration,Array<PVRTask>>()
        var task_idx = 0
        var drsn_idx = 0
        var drsn_left = arr_drsn[drsn_idx].duration //Closest Duration

        //Init Schedular Stavation Status
        self.dataViewCtrl.updateTask()
        self.dataViewCtrl.pruneTask()
        self.dataView.loadFromDB()
        var sch_stsk = Dictionary<String,Array<PVRTask>>()
        var sch_stv = Dictionary<String,Int>()
        for task in arr_task
        {
            sch_stsk[task.name] = self.generateSubtask(task: task).reversed() //Earlist Subtask Last
        }
        let sort_stv = {(tsk1:PVRTask,tsk2:PVRTask) -> Bool
            in
            return sch_stv[tsk1.name]! <= sch_stv[tsk2.name]! //Most Staved First
        }

        //Generate Schedule
        while arr_task.count > 0
        {
            //Update Data
            //Update Stavation Status
            for task in arr_task
            {
                sch_stv[task.name] = Int(task.deadline.timeIntervalSince(date)) / sch_stsk[task.name]!.count
            }
            arr_task = arr_task.sorted(by: sort_stv)
            //Update Duration
            if drsn_left <= 0
            {
                //Next Duration
