finish the scheduler v0.1