finish refactoring rebuild course to use the scheduler