add schedule logic