refactored schedule