refactoring : scheduler2