refactor schedules