scheduler: refactoring