Worked on makeSchedule, it now returns proper endtime.