new changes to scheduler
merged sched.c