modified sleep.c