add debug
refactored schedule