added changes to sched.c
merged sched.c