refactorred the schedular, remove some comments