fixed courseInSchedule method