added a function to read schedules