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

class ScheduleSortedAndExpand: SetConfigurations, SetSchedules {
    private var schedulesNSDictionary: [NSDictionary]?
    private var scheduleConfiguration: [ConfigurationSchedule]?
    private var expandedData = [NSDictionary]()
    private var sortedschedules: [NSDictionary]?

    // Calculate daily schedules


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