refactoring schedule model