removed unused $sched_dir variable