                     "timetostart": time,
                     "profilename": profilename,
                 ]
-                self.expandedData.append(dictSchedule)
+                self.expandedData!.append(dictSchedule)
             }
         }
     }


    init() {
        // Getting the Schedule and expanding all the jobs
        if self.schedules != nil {
            self.scheduleConfiguration = self.schedules!.getSchedule()
            self.setallscheduledtasksNSDictionary()
            self.sortAndExpandScheduleTasks()
        }
    }

    init(allschedules: Allschedules?) {
        guard allschedules != nil else { return }
        self.scheduleConfiguration = allschedules!.getallschedules()
        self.setallscheduledtasksNSDictionary()
        self.sortAndExpandScheduleTasks()


    // For XCtest
    init(schedules: Schedules?) {
        self.expandedData = [NSDictionary]()
        self.scheduleConfiguration = schedules?.getSchedule()
        self.setallscheduledtasksNSDictionary()
        self.sortAndExpandScheduleTasks()
