finished the scheduler