updated scheduler.c and .h